[fpc-pascal] how to use ppumove to create a shared library from units?

tcoq at free.fr tcoq at free.fr
Sat Aug 14 14:38:49 CEST 2010


I'm trying to use ppumove as described in the documentation to create a shared
library from a set of FPC units. This is different from creating a DLL by
specifying the symbols specially in an export section.

However ppumove fails with a message 'cannot export
symbol. symbol not found'.

I have a small test unit attached as an example.
I compile it using fpc 2.4.1 with the following command, on Windows XP:
fpc -Cg -Aas test.pp

In the assembler generated, the symbol for the calc procedure is present.

and then, when I use ppumove, like this:
ppumove -test.ppu

I get the following report:
"PPU-Mover Version 2.1.1
Copyright (c) 1998-2007 by the Free Pascal Development Team

Processing test.ppu...Error: PPU is already in a library : test.ppu
Linking Error: no files found to be linked

Using ppumove to generate the ld command (using the -b switch) generates the
following command:"ld -shared -E -o test1.dll test.o".
When executed, it generates the same error message:
Cannot export TEST_CALC$SMALLINT$SMALLINT$SMALLINT: symbol not found
Cannot export THREADVARLIST_TEST: symbol not found

I've also tried generated a shared rtl library using the recommended approach:
calling make in the root rtl source directory:
"make clean all CREATESHARED=1" with the same results.

Has somebody seen this already?
What am I doing wrong?
Can somebody reproduce the problem?

Best regards,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.pp
Type: application/octet-stream
Size: 177 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20100814/8573b29f/attachment.obj>

More information about the fpc-pascal mailing list