<retrying with a smaller zip>
I have prepared a minimal example of
the linking problems I get. Just unzip, create a "build" dir and run cmake. I'm using gcc 4.6.2.
As soon as I try to use the function
"file_size" I get the following linker errors:
Free Pascal Compiler
version 2.6.2 [2013/03/17] for i386
Copyright (c) 1993-2012 by Florian
Klaempfl and others
Target OS: Win32 for i386
Compiling
test.pp
Compiling test_h.pas
Linking project1.exe
test.pp(9,1) Error:
Undefined symbol: _open
test.pp(9,1) Error: Undefined symbol:
_filesize
test.pp(9,1) Error: Undefined symbol: _close
test.pp(9,1)
Fatal: There were 3 errors compiling module, stopping
It really seems I
need to add an additional library to the pascal source or that the linker cannot find some included symbols in libmsvcrt.a.
Any help
appreciated.
Regards, Darius
Ludo Brands schreef op 20 apr '13:
On
Darius Blaszyk wrote
> Hi, I'm linking a C and
FPC program but I keep on getting undifined symbols (see example below). Error: Undefined symbol: _strcpy Sofar I have added: {$linklib msvcrt} {$linklib gcc} What other libraries should I add? BTW, I'm compiling the C library with MinGW. Regards, Darius
_strcpy should be in msvcrt.
It is defined in the mingw libmsvcrt.a file
on my system. Is your lib
path correct?
BTW I use an explicit {$linklib libmsvcrt.a} with
mingw.
Ludo
_______________________________________________
fpc-pascal maillist -
http://lists.freepascal.org/mailman/listinfo/fpc-pascal [1]
Links:
------
[1]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal