gcc and linking problems?
Hugh Sasse
hgs@dmu.ac.uk
Fri Sep 8 14:34:00 GMT 2006
On Fri, 8 Sep 2006, Rupert Wood wrote:
> Hugh Sasse wrote:
>
> A few quick ideas, I don't have time to look into this right now:
>
> > > That's the offset in object file section where it's encountering
> > > the error, analogous to the line number GCC prints when you have
> > > a source error.
> >
> > OK.
>
> I forgot to mention: I think it'll turn that offset back into a line-number
> if you generate debug info (-g). But I'm not 100% about that.
Thanks. Yes, that works.
>
> > /usr/ccs/bin/nm: libfftw3.la: invalid file type
>
> This might be the problem: .la files are linker scripts and usually contain
> full paths to the .a files they're referencing. If you didn't build this
It came when I installed libfftw3 and there were no errors.
> yourself, or if you moved these files around the disk, then the .la file
Not moved them. There is a .a in the same directory.
> might contain a bad path which is confusing GNU ld. I can't remember if the
> Sun linker uses .las or if it's just a GNU linker thing.
The sun one should find the .a file then, I think..
>
> Have you tried using the Sun linker to link the GCC output?
If if define LD to point to sun's ld in the makefile, I get the
same errors when gcc is invoked for the final compile. I'm not
sure if that is how to tell gcc which ld to use. I can't see that
in -v --help or on gcc.gnu.org.
>
> Rup.
>
Thank you,
Hugh
More information about the Gcc-help
mailing list