How can I find the calling procedure for a symbol in case of an "undefined reference" linker error?

I have an inline target application related issue. I am developing a box using Min-GW for an ARM9 target that runs under Linux.
I am actually switching from static linking to dynamic linking with .so libraries to save memory space.
I am getting the error

libT3Printer.so: undefined reference to `__ASSERT '

I have checked all sources for lib and I have no idea where this function can be called. Is there a way to find out who (which source file or function) might be calling the missing function?

+2


source to share


2 answers


The link is probably hidden by a macro. If you run the compiler with the -E option to generate the predecessor output, you may have a better chance of tracking it.



+4


source


Try adding an NDEBUG definition .

In C, compilation with NDEBUG is defined:

gcc -DNDEBUG foo.c



disables all assert () calls and this behavior is identical in C ++:

g++ -DNDEBUG foo.cpp

0


source







All Articles