Am Donnerstag, 28. Dezember 2006 02:17 schrieb Giel van Schijndel:
> Dennis Schridde schreef:
> > Am Donnerstag, 28. Dezember 2006 01:42 schrieb Giel van Schijndel:
> >> Dennis Schridde schreef:
> >>> Am Mittwoch, 27. Dezember 2006 23:22 schrieb Giel van Schijndel:
> >>>> Dennis Schridde schreef:
> >>>>> Author: devurandom
> >>>>> Date: Wed Dec 27 22:44:46 2006
> >>>>> New Revision: 577
> >>>>>
> >>>>> URL: http://svn.gna.org/viewcvs/warzone?rev=577&view=rev
> >>>>> Log:
> >>>>> NSIS support for automake.
> >>>>> raw Makefiles might be broken, please report back!
> >>>>
> >>>> Reporting back:
> >>>>
> >>>> Yes, the raw makefiles are broken now.
> >>>> Compiling is still possible, linking not anymore however.
> >>>>
> >>>> You removed -lmingw32 from the linker list, while this library is
> >>>> *always* required for the linking of stand-alone executables (i.e. no
> >>>> DLLs etc.) using MinGW.
> >>>> Furthermore -lSDL_net depends on -lwsock32 so -lwsock32 needs to be
> >>>> provided _later_ on the command line than -lSDL_net. The same seems to
> >>>> be the case with -lSDL and -lwinmm.
> >>>>
> >>>> The attached patch fixes these issues.
> >>>
> >>> Swaping the if(windows) part with the generic one is not possible I
> >>> guess? Would remove the need for yet another if...
> >>
> >> No, the linker order is imperative here.
> >
> > Is that because of the Windows libs?
>
> Yes, it is.
>
> > A line like
> > -ljpeg -lpng -lz -lmad -lvorbisfile -lvorbis -logg -lphysfs -lSDLmain
> > -lSDL -lSDL_net -lGLU -lGL -lopenal works here (Linux/Makefile.raw)
> >
> > On Windows it would look like
> > -ljpeg -lpng -lz -lmad -lvorbisfile -lvorbis -logg -lphysfs -lSDLmain
> > -lSDL -lSDL_net -lmingw32 -lwsock32 -lwinmm -lglu32 -lopengl32 -lopenal32
> >
> > That way the wsock and winmm stuff would still be linked before SDL...
>
> Actually ^^ that way (the windows command line you've provided) causes
> wsock and winmm to be linked *after* SDL, which is exactly how it should
> be.
>
> Currently, however, it looks like this on windows:
> > -lwsock32 -lwinmm -lglu32 -lopengl32 -lopenal32 -ljpeg -lpng -lz -lmad
> > -lvorbisfile -lvorbis -logg -lphysfs -lSDLmain -lSDL -lSDL_net
>
> So to acquire the line you've got you'd have to swap the global and the
> if(windows) section. This however would still require another
> if(windows) section (before the global one) since -lmingw32 needs to be
> the first lib specified, otherwise linking will fail with unsatisfied
> references to '[EMAIL PROTECTED]'.
>
> So as long as you make sure that the output set of libs is in this order
>
> it should link:
> > -lmingw32 -ljpeg -lpng -lz -lmad -lvorbisfile -lvorbis -logg -lphysfs
> > -lSDLmain -lSDL -lSDL_net -lwsock32 -lwinmm -lglu32 -lopengl32 -lopenal32
Doesn't GCC link "from behind"? Means that it links the libs specified last in 
the commandline first?
Now I am confused... ;)

--Dennis

Attachment: pgpwa9xDs7a9m.pgp
Description: PGP signature

_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to