View Single Post
Posts: 1,203 | Thanked: 3,027 times | Joined on Dec 2010
#26
Originally Posted by AapoRantalainen View Post
So far it seems that -lm is needed in place where earlier doesn't needed.
If it works, why not. Have you also seen http://stackoverflow.com/questions/4...e-math-library

According to this one: http://stackoverflow.com/questions/1...h-library-in-c the C++ runtime libstdc++ requires libm, so if you compile a C++ program with GCC (g++), you will automatically get libm linked in.

Finally, http://stackoverflow.com/questions/7...n-ubuntu-11-10 some versions require -lm to be in a certain place in command sequence or it could be because a default flag in the linker.

Originally Posted by AapoRantalainen View Post
About multiple definition of `gnu_dev_major' etc. It is not warning, but error.

I found this post which I think be the most relevant:
http://us.generation-nt.com/answer/g...170398461.html
Theres another interesting piece of information on that page

The glibc support for the C99 inline semantics was added in glibc 2.6 (via
a large 2007-03-16 patch of Jakub's and some followups), and 2.6 is also
the version where all the non-TLS support was removed. GCC 4.3 and later
use C99 inline semantics in -std=gnu99 mode. To use any earlier version
of glibc with GCC 4.3 you need at least to backport the large patch.

Joseph S. Myers
Does the old version of GCC have TLS enabled?
 

The Following 4 Users Say Thank You to Android_808 For This Useful Post: