c++ - Why does gcc "--as-needed" flag cause a missing symbol? -


g++ [...] -ldiskcache_i [...] -ldcache  [...] 

links , runs fine, but

g++ [...] -xlinker --as-needed  -ldiskcache_i [...] -ldcache  [...] 

gives missing symbol:

libdiskcache_i.so: undefined reference `tdcachefile::stage(char const*, unsigned int, char const*)' 

both of these libraries shared objects.

the symbol requested in -ldiskcache_i , should resolved in -ldcache, before as-needed flag introduced. funny thing method is static method of class tdcachefile, , call uses static property.


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -