[DVDnav-discuss] r964 - in trunk/libdvdnav: Makefile misc/dvdnav-config2.sh

Nico Sabbi nicola_sabbi at fastwebnet.it
Sat Nov 17 22:30:34 CET 2007


Il Saturday 17 November 2007 22:11:28 Diego 'Flameeyes' Pettenò ha 
scritto:
> nicodvb <subversion at mplayerhq.hu> writes:
> > +	cd $(.OBJDIR) && $(CC) $(SHLDFLAGS) -ldvdread $(THREADLIB) -o
> > $@ $(SHOBJS)
>
> This will fail badly when you use -Wl,--as-needed (and many people
> do use this by default nowadays, distributions too).

do you mean that the right form is:

cd $(.OBJDIR) && $(CC) $(SHLDFLAGS)  -o $@ $(SHOBJS) \
	-ldvdread $(THREADLIB)

?
>
> The order of parameters in a linking command should be:
>
> $LD $LDFLAGS $OBJECTS $LIBS
>
> -o is an LD flag so you would put it before the objects, but for
> easy reading, putting it at the end is not a problem.
>
> Of course $LD could be $(CC) or $(CXX) depending on the language
> used.





More information about the DVDnav-discuss mailing list