c++ - Linking issues with pantheios - undefined reference pantheios_init -


i have read pretty of posts relating this. link core library twice, suggested in many places. can't figure out issue is. here error:

main.o: in function `pantheios_initialiser::pantheios_initialiser()': /home/awishformore/code/pantheios/include/pantheios/./internal/initialiser.hpp:119: undefined reference `pantheios_init' /home/awishformore/code/pantheios/include/pantheios/./internal/initialiser.hpp:121: undefined reference `pantheios_exitprocess' main.o: in function `pantheios_initialiser::~pantheios_initialiser()': /home/awishformore/code/pantheios/include/pantheios/./internal/initialiser.hpp:133: undefined reference `pantheios_uninit' 

this line makefile generates linking:

g++ -wall -g -i/home/awishformore/code/stlsoft/include -i/home/awishformore/code/pantheios/include -i/home/awishformore/code/boost_1_54_0 -i/home/awishformore/code/mysql/include -l/home/awishformore/code/pantheios/lib -l/home/awishformore/code/mysql/lib -l/home/awishformore/code/boost_1_54_0/lib -lpantheios.1.core.gcc46.file64bit.mt -lpantheios.1.fe.simple.gcc46.file64bit.mt -lpantheios.1.be.fprintf.gcc46.file64bit.mt -lpantheios.1.bec.fprintf.gcc46.file64bit.mt -lpantheios.1.core.gcc46.file64bit.mt -lpantheios.1.util.gcc46.file64bit.mt main.o database.o -o engine 

i don't see wrong it?

after hours , hours of wasting time on this, found answer in small, inconspicuous post.

due way pantheios built , way gcc works, libraries need appear behind object files in linking command, follows:

g++ <compiler flags> <include paths> main.o <other objects> <library paths> <libraries> -o main 

when tried that, error changed undefined pthread references, solved linking against pthread library, too.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -