> 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. ...

Solved. Instead of 

{$linklib c}

as described in the tutorial, read

http://community.freepascal.org:10000/bboards/message?message_id=268811&forum_id=24083

and give 

{$linklib c:/mingw/lib/libmsvcrt.a}

a try. Instead of specifying the absolute path, add the following line to the 
library search path of your fpc.cfg

-Flc:/mingw/lib

or wherever your mingw installation resides. The tutorial mentions, other 
linking errors might occur or might not, if 

{$link gcc}

is specified, or not. The earlier poster even had to add a

{$Linklib kernel32}

In my case, neither nor is required.

Wolfram

PS Maybe it's a good idea, providing Gilles Marcou's tutorial as a wiki instead 
of a PDF. At least me, I'd be happy to see continuous updates to such 
essentials and would not hesitate to do it by myself.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to