[fpc-pascal] linklib c using mingw, cygwin, both, or ...
wolfram.klaeger at web.de
wolfram.klaeger at web.de
Mon Oct 6 16:54:36 CEST 2008
I'm trying to follow the tutorial, How to use C code in FreePascal projects,
ftp://ftp.freepascal.org/pub/fpc/docs-pdf/CinFreePascal.pdf
In order to get gcc running on Windows, I tried both options, mingw and cygwin. This or that way, compiling hello.c to hello.o works. Linking hello.o to hello.pas via {$linklib c} fails, when hello.o was created via mingw/gcc. FPC can't find libc.dll or libc.a, since mingw does not install it.
With cygwin's gcc, libc.a can be found straightforward, where I would expect it, in c:/cygwin/lib/. fpc compiles without warning, now windows needs cygwin1.dll. Done, as well, but my hello.exe still ends up with runtime error 216.
Any advice, another way around?
Thanks in advance
Wolfram
More information about the fpc-pascal
mailing list