Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2020-07

Strange "Undefined symbol" error in FPC 3.2.0

6 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Виктор Матузенко

Hi!

I have pretty large program which compiles and runs fine with FPC 3.0.2, but if I try to compile it with FPC 3.2.0 (win32, i386, downloaded installer here
https://sourceforge.net/projects/freepascal/files/Win32/3.2.0/ ), I get the following error:

odd_gardens.pp(37,44) Error: Undefined symbol:
DPARSER_D:=D:\proj\.debug\games\odd_gardens_PARSEHEXU32UNSAFE$PCHAR$PCHAR$LONGWORDD:=D:\proj\.debug\games\odd_gardensLONGWORD

odd_gardens.pp is the main source file of the program, dparser is one of units in the project,
ParseHexU32Unsafe is a function in the dparser unit, and D:\proj\.debug\games\odd_gardens is the directory with the program source file.

Line 37 of the odd_gardens.pp seems to be unrelated to the error:

QuestSetConfigFileName('data/config.json');

How do I investigate this?

Victor Matuzenko (Виктор Матузенко)
Виктор Матузенко
to Alexey

сб, 1 авг. 2020 г. в 13:26, Alexey via fpc-pascal <

: Did you try to delete all "lib" dirs in your project? (compiled units)

Yes, I did. The error is reproducible and the same each time I run clean build.

I've got a minimal reproducible example with similar error. See attachment.

The example has two source files: dparser.pas and main.pas. The main is here only
to call the function ParseHexU32Unsafe defined in the dparser unit.

Seems like inlines lead to the error, because if I remove all inlines in the dparser unit
the program compiles fine.

In provided Makefile you can find the building command line:

fpc -Sd -Oodfa -Sew -Xm -vm5037 -g -gl -al -an -ar -at -vq -Sa main.pas -omain.exe

I get the following error for the example:

Error: Undefined symbol:
DPARSER_$$_PARSEHEXU32UNSAFE$PCHAR$PCHAR$LONGWORD$$LONGWORD

What's my next step? Sending the example to bug tracker?

Victor Matuzenko (Виктор Матузенко)
Виктор Матузенко
to Joost van der Sluis

Reported: https://bugs.freepascal.org/view.php?id=37496

вт, 4 авг. 2020 г. в 15:25, Joost van der Sluis :

Show quoted text 15 lines
Op 01-08-2020 om 14:32 schreef Виктор Матузенко via fpc-pascal: > Error: Undefined symbol: > DPARSER_$$_PARSEHEXU32UNSAFE$PCHAR$PCHAR$LONGWORD$$LONGWORD > > What's my next step? Sending the example to bug tracker? Yes, please. Regards, Joost _______________________________________________ fpc-pascal maillist - https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Victor Matuzenko (Виктор Матузенко)