c++ - Undefined references during linking when compiling with clang, but not with gcc -


i'm working on quite large c++ project, , have option compile either clang (3.6) or gcc (5.1).

now project produces executable, uses quite bit of shared libraries (which built part of project).

now when compile gcc, fine , working executable. however, when compile clang, linking errors when linking executable:

/home/{user}/projects/60channelsip/bin/clang/opt/swmi/lib/libsystem.so: undefined reference `boost::program_options::arg' /home/{user}/projects/60channelsip/bin/clang/opt/swmi/lib/libmysql.so: undefined reference `mysqlpp::query::str(mysqlpp::sqlqueryparms&)' /home/{user}/projects/60channelsip/bin/clang/opt/swmi/lib/libtfc.so: undefined reference `std::ios_base::failure::failure(char const*, std::error_code const&)' /home/{user}/projects/60channelsip/bin/clang/opt/swmi/lib/libtfc.so: undefined reference `boost::gregorian::greg_month::get_month_map_ptr()' 

the strange thing libraries references compile , link fine, , required libraries linker mentions configured linking stage in executable (newlines added readability):

"/usr/bin/ld" -export-dynamic -z relro --hash-style=gnu --hash-style=both --build-id --enable-new-dtags --eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o /home/{user}/projects/60channelsip/bin/clang/opt/swmi/bin/tetranode /usr/lib/crt1.o /usr/lib/crti.o /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/5.1.0/crtbegin.o -l/home/{user}/projects/60channelsip/bin/clang/opt/swmi/lib -l/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/5.1.0 -l/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/5.1.0/../../.. -l/usr/local/bin/../lib -l/lib -l/usr/lib -ltcmalloc_minimal -rpath ../lib -rpath /opt/swmi/lib /home/{user}/projects/60channelsip/obj/clang/tetranode/tmcoperationalmgrcmd.o /home/{user}/projects/60channelsip/obj/clang/tetranode/tmcdispatchers.o /home/{user}/projects/60channelsip/obj/clang/tetranode/tmcapplication.o /home/{user}/projects/60channelsip/obj/clang/tetranode/tmcexe.o /home/{user}/projects/60channelsip/obj/clang/tetranode/testcommand.o /home/{user}/projects/60channelsip/obj/clang/tetranode/tmccommand.o /home/{user}/projects/60channelsip/obj/clang/tetranode/tetranodetestcmd.o /home/{user}/projects/60channelsip/obj/clang/tetranode/tmccopyprotection.o -lintertnx -ludpcp -lstatistics -lmysql -lhptl -lurlhandling -ltigtnx -ltigtsc -ltig -ltig2tnx -ltig2tsc -ltig2 -lnmscommunications -lwebservergoahead -ltetracapture -ltetratnx -ltetranumberplan -ltetrabs -ltetra -ltbscomm -llrrp -ltelephonetnx -lomtcctnspv1v2 -ltelephonetsc -ltelephone -lmpttnx -lmptnumberplan -lmptnumberplantsc -lmpttsc -lmpt -le1telephonetsc -le1telephone -le1mediapro -lisdn -lsiptelephone -lsipgateway -lrohill.codec -lconventionaltnx -lconventionaltsc -lconventional -lcommoncallprotocoltsc -lcommoncallprotocol -lallcallprotocolsnumberplan -lresourcemgr -lcallmgr -ltransmissionmgr -loperationalmgrtmc -ltca -ltnpnp -lswtcc -lswmi -lacelpmixer -lnodecapabilities -lprotocolcapabilities -ltig2mgr -ldatabase -linternodemgr -loperationalmgrtcc -lcalllogger -ltcctnspv2 -ltnspv2 -ltnsp -liplinktetra -liplinkr855 -liplinkcore -ltndutilities -ltfc -lnmea -lversion -ltmw -lsystem -lrohill.core -lrohill.sip -lagent++ -lsnmp++ -lmysqlpp -lmysqlclient -lrt -lncurses -lcrypt -lxml2 -lcurl -lz -lbz2 -lssl -lcrypto -ldl -luuid -lboost_signals -lboost_system -lboost_filesystem -lboost_regex -lboost_thread -lboost_iostreams -lboost_program_options -lboost_chrono -lboost_date_time -ltetracapture -ltmw -ljansson -lstdc++ -lm -lgcc_s -lgcc -lpthread -lc -lgcc_s -lgcc/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/5.1.0/crtend.o /usr/lib/crtn.o 

from can find libraries linker complaining later in linker list libraries says have undefined references. ideas?


edit

seeing gcc & clang commands large posted here (it expires body length quite bit), here's link pastebin.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -