views:

95

answers:

2

Hello,
I have a problem linking an application for an embedded target. I'm developing on a windows box using Min-GW for an ARM9 target that runs under Linux.
Actually I'm switching from static linking to dynamic linking with .so-libraries to save memory space.
I get the error message

libT3Printer.so: undefined reference to `__ASSERT'

I checked all the sources for the lib and I have no idea where this function could be called. Is there any possibility to find out, who (which source file or function) could be the caller of the missing function?

+3  A: 

The reference is probably being hidden by a macro. If you run the compiler with the -E option to generate predecessor output you might have a better chance of tracking it down.

Michael Burr
very simple, and very good advice, thanks a lot!
chrmue
A: 

Try to add definition NDEBUG.

In C, compiling with NDEBUG defined:

gcc -DNDEBUG foo.c

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

g++ -DNDEBUG foo.cpp

Nadir SOUALEM