• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Compiling -lpthread vs -pthread in CXXFLAGS or AM_CXXFLAGS Makefile.am configure.ac LIBS="$LIBS $XML_LIBS" what and where to put

forumek

Member
Joined
Jan 14, 2019
Messages
61
Reaction score
22
so to fix this compilation error in tfs 0.4 r3884 on debian 8:
Code:
/usr/bin/ld: connection.o: undefined reference to symbol 'pthread_mutexattr_settype@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
you have to add and now is the question because both options work

I can use -lpthread and compile fine
with -pthread also compiles fine

and another thing where to put it exactly?
it works fine with AM_CXXFLAGS = in Makefile.am but also no problems when I add it to CXXFLAGS = in Makefile.am
also adding it to configure.ac in LIBS="$LIBS $XML_LIBS" is also a working option
so there are many combinations and I'm confused

so should I use -lpthread or -pthread ?
and where exactly I should add it?
 
Last edited:
Back
Top