This is the mail archive of the gcc-help@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: missing libraries under Kubuntu 12.04, 64 bit


geezers <fastsnip-gcc@yahoo.com> writes:

> Sorry my mistake: The original makefile read:
>
> $(CC) -o $@ -ldl -rdynamic $(OBJS) 
>
> and that was changed to read:
>
> $(CC) -o $@ -rdynamic $(OBJS) -ldl

OK, that makes me more sense.  It is always correct to put the -l option
after the objects that refer to it, and never correct to put the -l
option first.  The relative order of -l options and object files
matters.  Putting -ldl before the object files was probably working for
you only by accident.

Ian


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