Building the filecopy plugin for windows

Herbert König herbertkoenig at gmx.net
Fri Jun 10 11:56:33 UTC 2005


Hello,

trying to build the filecopy plugin for windows, I have to use a
function from windows kernel32.lib with the headerfile winbase.h.

Before the compiler even starts working on my plugin it stops at the
#include <winbase.h> with the messages at the end of this mail.

Before trying this I successfully built a Windows VM, then removed the
platforms tree, restored it from the Zip, added my FileCopyPlugin
Directory and rebuilt the sources with the VMMakerTool.

VMMaker did not complain about my C sources (I guess it just checked
the existence) but created FileCopyPlugin.c and FileCopyPlugin.h.
FilecopyPlugin.o was created by the build process I started
afterwards.

I named my file sqWindowsFileCopyPlugin.c and magically VMMaker made
it so that the build process started gcc on my file.

Actually, when including stat.h similar problems occur but I think I
don't need stat.h. Anyway I added the messages with stat.h too.

Please note, I have rudimentary knowledge about C, I'm still in the
phase of "Look which includes are needed" and I started from the unix
example.

It looks like I got wrong header files, though everything is done like
it's said on the swiki and a normal vm can be built.

All done in 3.7, files obtained shortly before 3.8 was out.

Anybody got an idea?

Best regards,

Herbert                          mailto:herbertkoenig at gmx.net


Here comes the error:

First with stat.h:

F:\squeak_3_7_vmbuild\platforms\win32>make -f Makefile.mingw32
make[1]: Entering directory `F:/squeak_3_7_vmbuild/platforms/win32/plugins/FileC
opyPlugin'
gcc -o ./sqWindowsFileCopyPlugin.o -g -mpentium -mwindows -O3 -fomit-frame-point
er -funroll-loops -fschedule-insns2 -I. -I../../ -I../..//vm -Ic:/dx7sdk/include
  -DWIN32_FILE_SUPPORT -DNO_STD_FILE_SUPPORT -DNDEBUG -DLSB_FIRST -DX86 -DSQUEAK
_BUILTIN_PLUGIN -c sqWindowsFileCopyPlugin.c
sqWindowsFileCopyPlugin.c:69: parse error before string constant
In file included from sqWindowsFileCopyPlugin.c:76:
C:\gnutools\bin\..\lib\gcc-lib\i386-mingw32\2.95.2\..\..\..\..\i386-mingw32\incl
ude\sys\stat.h:118: parse error before `}'
C:\gnutools\bin\..\lib\gcc-lib\i386-mingw32\2.95.2\..\..\..\..\i386-mingw32\incl
ude\sys\stat.h:143: warning: `struct _stat' declared inside parameter list
C:\gnutools\bin\..\lib\gcc-lib\i386-mingw32\2.95.2\..\..\..\..\i386-mingw32\incl
ude\sys\stat.h:143: warning: its scope is only this definition or declaration, w
hich is probably not what you want.
C:\gnutools\bin\..\lib\gcc-lib\i386-mingw32\2.95.2\..\..\..\..\i386-mingw32\incl
ude\sys\stat.h:145: warning: `struct _stat' declared inside parameter list
C:\gnutools\bin\..\lib\gcc-lib\i386-mingw32\2.95.2\..\..\..\..\i386-mingw32\incl
ude\sys\stat.h:151: warning: `struct _stat' declared inside parameter list
In file included from sqWindowsFileCopyPlugin.c:86:
C:\gnutools\bin\..\lib\gcc-lib\i386-mingw32\2.95.2\..\..\..\..\i386-mingw32\incl
ude\winbase.h:499: parse error before `DWORD'
C:\gnutools\bin\..\lib\gcc-lib\i386-mingw32\2.95.2\..\..\..\..\i386-mingw32\incl
ude\winbase.h:499: warning: no semicolon at end of struct or union
C:\gnutools\bin\..\lib\gcc-lib\i386-mingw32\2.95.2\..\..\..\..\i386-mingw32\incl
ude\winbase.h:500: warning: data definition has no type or storage class
C:\gnutools\bin\..\lib\gcc-lib\i386-mingw32\2.95.2\..\..\..\..\i386-mingw32\incl
ude\winbase.h:501: warning: data definition has no type or storage class
F:\squeak_3_7_vmbuild\platforms\win32>build

..... and so on

no without including stat.h:

make[1]: Entering directory `F:/squeak_3_7_vmbuild/platforms/win32/plugins/FileC
opyPlugin'
gcc -o ./FileCopyPlugin.o -g -mpentium -mwindows -O3 -fomit-frame-pointer -funro
ll-loops -fschedule-insns2 -I. -I../../ -I../..//vm -Ic:/dx7sdk/include  -DWIN32
_FILE_SUPPORT -DNO_STD_FILE_SUPPORT -DNDEBUG -DLSB_FIRST -DX86 -DSQUEAK_BUILTIN_
PLUGIN -c FileCopyPlugin.c
gcc -o ./sqWindowsFileCopyPlugin.o -g -mpentium -mwindows -O3 -fomit-frame-point
er -funroll-loops -fschedule-insns2 -I. -I../../ -I../..//vm -Ic:/dx7sdk/include
  -DWIN32_FILE_SUPPORT -DNO_STD_FILE_SUPPORT -DNDEBUG -DLSB_FIRST -DX86 -DSQUEAK
_BUILTIN_PLUGIN -c sqWindowsFileCopyPlugin.c
sqWindowsFileCopyPlugin.c:69: parse error before string constant
In file included from sqWindowsFileCopyPlugin.c:86:
C:\gnutools\bin\..\lib\gcc-lib\i386-mingw32\2.95.2\..\..\..\..\i386-mingw32\incl
ude\winbase.h:500: warning: data definition has no type or storage class
C:\gnutools\bin\..\lib\gcc-lib\i386-mingw32\2.95.2\..\..\..\..\i386-mingw32\incl
ude\winbase.h:501: warning: data definition has no type or storage class
C:\gnutools\bin\..\lib\gcc-lib\i386-mingw32\2.95.2\..\..\..\..\i386-mingw32\incl
ude\winbase.h:503: parse error before `DWORD'
C:\gnutools\bin\..\lib\gcc-lib\i386-mingw32\2.95.2\..\..\..\..\i386-mingw32\incl
ude\winbase.h:503: warning: no semicolon at end of struct or union
C:\gnutools\bin\..\lib\gcc-lib\i386-mingw32\2.95.2\..\..\..\..\i386-mingw32\incl
ude\winbase.h:504: warning: data definition has no type or storage class
C:\gnutools\bin\..\lib\gcc-lib\i386-mingw32\2.95.2\..\..\..\..\i386-mingw32\incl
ude\winbase.h:505: parse error before `ftLastAccessTime'







More information about the Squeak-dev mailing list