[fpc-pascal] trying to use C code in .pas on WIN32
Marc Santhoff
M.Santhoff at t-online.de
Tue Jan 29 14:13:34 CET 2019
On Mon, 2019-01-28 at 08:19 -0700, conlin664 via fpc-pascal wrote:
> 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
>
How do your declaration and compiler switch(es) in the code look like?
--
Marc Santhoff <M.Santhoff at t-online.de>
More information about the fpc-pascal
mailing list