missing libraries under Kubuntu 12.04, 64 bit

Ian Lance Taylor iant@google.com
Mon Jun 4 23:26:00 GMT 2012


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



More information about the Gcc-help mailing list