[CMake] undefined reference to memcpy ?

Alexander Neundorf a.neundorf-work at gmx.net
Tue Jun 13 09:12:17 EDT 2006


Von: Alexander Neundorf <a.neundorf-work at gmx.net>

> Hi,
> 
> I have three libraries here, libA, libB and libC. All three are linked as
> shared libs. libB and libC are written in C++ but have a C interface, libA
> is completely C.
> When trying to link libC, which links to libB, which links to libA I get
> undefined references to memcpy (but only from one of the object files).
> I have no idea what could be the reason for this problem. 
> 
> Any ideas ?
> I have no special linker flags set.
> This is on SUSE 10.0 using gcc 4.0.2

Ok, I found it.
In one of the headers was 
#pragma GCC visibility push(hidden)
which caused the linker not to find memcpy(). Removing it helped.

Alex

-- 


Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer


More information about the CMake mailing list