This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Troubleshooting with gcc 4.6


santi <salcubo@gmail.com> writes:

> I recently updated my Ubuntu 10.10 to 11.10 and since then I have been
> having problems with my compiler. I have seen that this new Ubuntu
> distribution uses gcc 4.6 whilest my old 10.10 used gcc 4.4.5 or
> 4.4.6.
>
> The main problem I have nowadays is with the math.h library when I
> need to use functions as sqrt() or pow() that I used to use without
> any problem in the old distribution (well, I had to write the -lm
> option when I tried to compile my source files but it did run
> perfectly). Today I'm getting and unresolve refernce to 'sqrt' when I
> comile my files even though I'm using the -lm option.

This question is not appropriate for the mailing list gcc@gcc.gnu.org.
It would be appropriate for gcc-help@gcc.gnu.org.  Please take any
followups to gcc-help.  Thanks.

When asking a question of this sort, it helps a lot if you show us
precisely what you did and precisely what happened.  Without seeing
that, I am going to guess that you are running into multiarch libraries.
Debian, and therefore Ubuntu, decided to move the system libraries from
the locations where all GNU/Linux distros have put them for many years.
They have updated their own versions of gcc, but the mainstream gcc
releases have not been updated.

This is going to be an ongoing problem for many years for people who use
Debian or Ubuntu.  I do not know how to resolve it.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]