[lazarus] can't make mwedit on win32

Vincent Snijders vrs at dds.nl
Mon Apr 17 23:16:50 EDT 2000


Hi,

Since we are close to an announcement of  the progress of lazarus to a wider
audience, I checked if some points I mentioned earlier have been fixed.

When I do make in the lazarus directory, I get the following error when
compiling mwcustomedit.

ppc386.exe !FPCEXTCMD mwcustomedit.pas
mwcustomedit.pas(1813,58) Error: Incompatible type for arg no. 8: Got
VOID_POINTER, expected LONGINT
mwcustomedit.pas(1863,43) Error: Incompatible type for arg no. 8: Got
VOID_POINTER, expected LONGINT
mwcustomedit.pas(1890,58) Error: Incompatible type for arg no. 8: Got
VOID_POINTER, expected LONGINT
mwcustomedit.pas(1907,58) Error: Incompatible type for arg no. 8: Got
VOID_POINTER, expected LONGINT
mwcustomedit.pas(1953,43) Error: Incompatible type for arg no. 8: Got
VOID_POINTER, expected LONGINT
mwcustomedit.pas(1978,58) Error: Incompatible type for arg no. 8: Got
VOID_POINTER, expected LONGINT
mwcustomedit.pas(2040,48) Error: Incompatible type for arg no. 8: Got
VOID_POINTER, expected LONGINT
mwcustomedit.pas(2058,58) Error: Incompatible type for arg no. 8: Got
VOID_POINTER, expected LONGINT
mwcustomedit.pas(2192,69) Error: Incompatible type for arg no. 8: Got
VOID_POINTER, expected LONGINT
mwcustomedit.pas(2212,58) Error: Incompatible type for arg no. 8: Got
VOID_POINTER, expected LONGINT
mwcustomedit.pas(2233,58) Error: Incompatible type for arg no. 8: Got
VOID_POINTER, expected LONGINT
mwcustomedit.pas(2251,58) Error: Incompatible type for arg no. 8: Got
VOID_POINTER, expected LONGINT
mwcustomedit.pas(2275,58) Error: Incompatible type for arg no. 8: Got
VOID_POINTER, expected LONGINT
mwcustomedit.pas(2296,58) Error: Incompatible type for arg no. 8: Got
VOID_POINTER, expected LONGINT
mwcustomedit.pas(2329,58) Error: Incompatible type for arg no. 8: Got
VOID_POINTER, expected LONGINT
mwcustomedit.pas(2347,58) Error: Incompatible type for arg no. 8: Got
VOID_POINTER, expected LONGINT
mwcustomedit.pas(2807,36) Error: Incompatible type for arg no. 3: Got
SCROLLINFO, expected LPCSCROLLINFO
mwcustomedit.pas(2823,36) Error: Incompatible type for arg no. 3: Got
SCROLLINFO, expected LPCSCROLLINFO
mwcustomedit.pas(2887,26) Error: Incompatible type for arg no. 2: Got
TPOINT, expected POINT
mwcustomedit.pas(4145,34) Error: Incompatible types: got "POINT" expected
"TPOINT"
mwcustomedit.pas(4588,1) Fatal: Internal error 7453984
make.exe[2]: *** [mwcustomedit.ppw] Error 1
make.exe[2]: Leaving directory `e:/pp/source/lazarus/components/mwedit'
make.exe[1]: *** [mwedit_all] Error 2
make.exe[1]: Leaving directory `e:/pp/source/lazarus/components'
make.exe: *** [components_all] Error 2

 This is due to some type incompatiblities between LCLLinux and windows. I
propose (and have proposed) to use LCLLinux also under windows, as it is an
interface to the underlying OS/Winapi. In that case you can leave out a few
IFDEFs in the mwcustomedit file, so it also results in cleaner code,
although a bit slower due to the extra indirection, which we are accepting
in the LCL for winapi calls anyway.
I 'll attach the diff file for these changes in mwcustomedit.pas as
mwcustomedit.dif

These changes introduce a new problem with the clipboard unit. The current
clipboard unit includes the clipboard constants for linux, but not for
windows (you are supposed to use the windows unit). A solution for this
would be to move the CF_xxxx constants to LCLLinux and to use this unit in
the clipboard unit.

I could suply you with diff files for patching mwcustomedit.pas clipboard.pp
and lcllinux.pp, if you want.

If you have a better way to solve these problems, say so. You might remember
a from Florian a few days ago when he also ran into the same problem, but
proposed a different solution for only a part of the problem. If you follow
his suggestion (Florian: "I think the easiest solution ís to define TPOINT
in classes only if the target isn't win32 else tpoint=windows.tpoint"), then
you need also to change some things in the windows or the LCLLinux unit (I
am not sure) to solve problems with passing a pointer or a var variable to a
winapi function.

If there is someone who compiled mwedit on win32 without changes straight
from the CVS, I would like to hear so.

Regards,
Vincent.








More information about the Lazarus mailing list