Hi, On Wed, 27 Nov 2019, Ryan Joseph via fpc-pascal wrote:
> I'm trying to link to a static library (built from Python sources) in > Pascal and having troubles on Linux. On Mac where I have experience I > successfully link and every works as expected but on Linux I get slews > of linker errors in what appear to be standard C library functions. > (snipp) > Do I need to link to other system libraries when building on Linux? Yes. By Default, FPC doesn't link against libc on Linux by default, only when some more advanced things, say, threading is used. To the contrary on Darwin (macOS), we always link against libc. There comes your difference from. You can just try to add {$LINKLIB C} to your code, and see if that helps. > I'm also confused because I thought the purpose of the static libraries > was to contain all the code they needed to run and thus these system > functions like "memcpy" would be present also. That's not true. Static libs can depend on other static libs, just the resulting final executable won't depend on anything if statically linked. Hope this helps, -- Charlie _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal