[fpc-pascal] trying to use C code in .pas on WIN32

conlin664 conlin664 at yahoo.com
Mon Jan 28 16:19:12 CET 2019

Thanks for the suggestions..

I'm pretty sure now, that the problem is that I'm thinking that the C code
is being statically linked,
but right now the compiler is going for dynamic.
[ I've been comparing the size of the .exe ]

I also compiled with -va and note:

[0.388] Number of unresolved externals in objects 214
[0.388] Number of unresolved externals after static libraries 214
[0.388] Number of unresolved externals after defining COMMON symbols 214
[0.389] Number of unresolved externals after DLL imports 0
[0.396] There were 1 errors compiling module, stopping

when I don't try and call the C routine the number of unresolved objects is
only 213

compiler switches:

-TWin32 -va -Mfpc -vw -Sg  -Ci -O1 -Cp386 -OpPENTIUM3 -Ratt -gl -p- -b-

I had -XS in there, but it doesn't seem to change anything.

So I'm just looking to static link external C code to a pascal program on a
windows machine



Sent from: http://free-pascal-general.1045716.n5.nabble.com/

More information about the fpc-pascal mailing list