On Sun, Oct 30, 2011 at 9:29 PM, Dave Gilbert
wrote:
> One difference from 10.04 is that the linker is more touchy about the
> order of link options, so make sure the -lrt is after the .o which
> requires it.
Interesting, and it solves the problem.
I have this code in a file named bug.c:
> I
The undefined reference is certainly link stage; can you show me a
cut&paste from the terminal showing the exact compile line and sequence
of errors.
One difference from 10.04 is that the linker is more touchy about the
order of link options, so make sure the -lrt is after the .o which
requires it
I am using -lrt.
However, that does not seem to be the issue since it affects linking. My
compiles are failing before the linking step is reached.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/882954
Hi Sandy,
You need to add a -lrt to pick up clock_gettime which seems to live in librt
these days.
Dave
** Changed in: gcc-4.6 (Ubuntu)
Status: New => Invalid
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.la
** Package changed: gcc-defaults (Ubuntu) => gcc-4.6 (Ubuntu)
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/882954
Title:
gcc fails to compile legal code
To manage notifications about this bug go t