title: undefined references in libpthread and libc
body: <p>I'm having trouble compiling some examples in a odbc sdk. After some time mingling with the library order, I somehow managed to get the number of undefined references to just a handful of them.</p>
  
  <p>Sadly, I can't figure out how to get rid of the remaining ones. Here's the command that's failing:</p>
  
  <pre><code>g++ -Wall -z defs -m64 -DSIMBA -D_REENTRANT -fPIC -O0 -g -shared Common/TabbedUnicodeFileReader_Linux_x8664_debug.cpp.o Core/QSConnection_Linux_x8664_debug.cpp.o Core/QSDriver_Linux_x8664_debug.cpp.o Core/QSEnvironment_Linux_x8664_debug.cpp.o Core/QSStatement_Linux_x8664_debug.cpp.o DataEngine/QSDataEngine_Linux_x8664_debug.cpp.o DataEngine/QSMetadataHelper_Linux_x8664_debug.cpp.o DataEngine/QSTable_Linux_x8664_debug.cpp.o DataEngine/QSTableUtilities_Linux_x8664_debug.cpp.o DataEngine/QSTypeInfoMetadataSource_Linux_x8664_debug.cpp.o Common/QSTableMetadataFile_Unix_Linux_x8664_debug.cpp.o Common/QSUtilities_Unix_Linux_x8664_debug.cpp.o Main_Unix_Linux_x8664_debug.cpp.o    -Wl,--no-undefined -Wl,--no-allow-shlib-undefined -Wl,--whole-archive,/home/hector/Downloads/SimbaEngineSDK/9.0/DataAccessComponents//Lib/Linux_x8664/libSimbaDSI_debug.a,/home/hector/Downloads/SimbaEngineSDK/9.0/DataAccessComponents//Lib/Linux_x8664/libSimbaSupport_debug.a,/home/hector/Downloads/SimbaEngineSDK/9.0/DataAccessComponents//Lib/Linux_x8664/libAEProcessor_debug.a,/home/hector/Downloads/SimbaEngineSDK/9.0/DataAccessComponents//Lib/Linux_x8664/libCore_debug.a,/home/hector/Downloads/SimbaEngineSDK/9.0/DataAccessComponents//Lib/Linux_x8664/libDSIExt_debug.a,/home/hector/Downloads/SimbaEngineSDK/9.0/DataAccessComponents//Lib/Linux_x8664/libExecutor_debug.a,/home/hector/Downloads/SimbaEngineSDK/9.0/DataAccessComponents//Lib/Linux_x8664/libParser_debug.a,/home/hector/Downloads/SimbaEngineSDK/9.0/DataAccessComponents//Lib/Linux_x8664/libSimbaODBC_debug.a -Wl,--no-whole-archive -Wl,--soname=../Bin/Linux_x8664/libQuickstart_debug.so -L/home/hector/Downloads/SimbaEngineSDK/9.0/DataAccessComponents//ThirdParty/icu/Linux_x8664/lib -licuuc_simba64 -licudata_simba64 -licui18n_simba64 -lpthread -lm -lc -ldl -Wl,--version-script=exports_Linux.map -o ../Bin/Linux_x8664/libQuickstart_debug.so
  </code></pre>
  
  <p>Edit: Missing symbols</p>
  
  <pre><code>/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libdl.so: undefined reference to `_dl_rtld_di_serinfo@GLIBC_PRIVATE'
  /lib/x86_64-linux-gnu/libpthread.so.0: undefined reference to `_dl_allocate_tls_init@GLIBC_PRIVATE'
  /lib/x86_64-linux-gnu/libpthread.so.0: undefined reference to `__libc_stack_end@GLIBC_2.2.5'
  /lib/x86_64-linux-gnu/libpthread.so.0: undefined reference to `_dl_get_tls_static_info@GLIBC_PRIVATE'
  /lib/x86_64-linux-gnu/libpthread.so.0: undefined reference to `__tls_get_addr@GLIBC_2.3'
  /lib/x86_64-linux-gnu/libpthread.so.0: undefined reference to `_dl_deallocate_tls@GLIBC_PRIVATE'
  /lib/x86_64-linux-gnu/libpthread.so.0: undefined reference to `_rtld_global@GLIBC_PRIVATE'
  /lib/x86_64-linux-gnu/libc.so.6: undefined reference to `_dl_argv@GLIBC_PRIVATE'
  /lib/x86_64-linux-gnu/libc.so.6: undefined reference to `__libc_enable_secure@GLIBC_PRIVATE'
  /lib/x86_64-linux-gnu/libpthread.so.0: undefined reference to `_dl_allocate_tls@GLIBC_PRIVATE'
  /lib/x86_64-linux-gnu/libpthread.so.0: undefined reference to `_rtld_global_ro@GLIBC_PRIVATE'
  /lib/x86_64-linux-gnu/libpthread.so.0: undefined reference to `_dl_make_stack_executable@GLIBC_PRIVATE'
  </code></pre>
  
  <p>Fixed:</p>
  
  <p>Removing -Wl,--no-allow-shlib-undefined seemed to do the trick. The built shared library seems to work perfectly.</p>