Page 1 of 1

chasing undefined symbol `time_@@GLIBC_2.2.5

Posted: Thu Aug 08, 2013 2:43 pm
by mariosk8s
Since it might be useful to others chasing undefined symbols without wanting to comment out code until the problem goes away, here's how i tracked down undefined symbols.

* Compile your program with commented assembler turned on (-c or /COMMENTED in Windows).

Code: Select all

pbcompiler -c -so libfoo.so libfoo.pb
* Open the locally generated purebasic.asm in your favorite text editor.
* Look for the missing symbol after a CALL directive.
* When you scroll up you should see the pb code that generated the assembler.
* This should give you a hint on where to look.

While my example was Linux, this should work on all platforms.

As i learned afterwards i could have potentially looked for the system call in the source code, too.
But, first of all, i didn't know it was a system call, second, source code is usually scattered across several directories.
Using this approach all the code used is in one file, also eliminating source code that isn't actually compiled in.

Hope this helps.