This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
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