[Dune-devel] SOCIS 2014: build system issue

Agnese, Marco m.agnese13 at imperial.ac.uk
Wed Jul 9 13:59:58 CEST 2014


Hi, 
I have a small issue when I compile my projects using thread. More precisely my codes compile correct but the thread library is not linked. 

I have compiled the module both with the option -std=C++1 and -pthread. A workaround to fix this linking issue is to append the the flag 

-Wl,--no-as-needed 

at the end of the linking command.

I think that the build system should produce a Makefile which links correctly the -pthread library without using this workaround. I do not know how to modify it therefore I need your help.

This workaround it is not necessary when compiling a plain c++ code. Indeed it is sufficient g++ -std=C++11 -pthread -o test test.cc. I don't understand why it is necessary this additional flag with DUNE.

Thank you very much,
Regards,
Marco.



More information about the Dune-devel mailing list