Re: [Warzone-dev] warzone devpackage
Dennis Schridde schreef: Am Mittwoch, 27. Dezember 2006 18:49 schrieb Giel van Schijndel: Dennis Schridde schreef: Am Mittwoch, 27. Dezember 2006 18:11 schrieb Giel van Schijndel: I assume that you've modified the warzone devpackage for that ( this one: http://download.gna.org/warzone/development/warzone-devpkg.7z ), would you care to upload the version you're using there? Allready done, just didn't announce it yet. (MSVC package is not yet uploaded.) http://download.gna.org/warzone/development/warzone-devpkg-mingw32.7z The warzone-devpkg.7z will vanish when I uploaded the MSVC pkg. Well that new MinGW devpackage doesn't work all to nice. It gives me a whole bunch of png related compiler errors. g++ -m32 -DVERSION=\2.0.5\ -DYY_STATIC -I.. -I../.. -IC:\devpkg/include -fpermissive -Wall -O0 -g3 -DDEBUG -mwindows -DWIN32 -c -opcx.o pcx.c In file included from pcx.c:1: C:/devpkg/include/png.h:1: error: expected constructor, destructor, or type conversion before '/' token C:/devpkg/include/png.h:1: error: expected `,' or `;' before '/' token In file included from pcx.c:1: C:/devpkg/include/png.h:1:15: warning: no newline at end of file Did you have a look at that png.h? Could it be related to DOS/UNIX lineendings? No, GCC (and as such MinGW) doesn't care about line-endings as long as they're the same throughout the file. When looking at that last error message you quoted it also indicates a line number of 1, which suggests the last line is nrl 1. Meaning there is only one line there, so I went to watch there and this where its contents exactly: libpng12/png.h (without quotes). While it should (most likely) be this: #include libpng12/png.h So that's an easy fix, that fixes compiling. So now we're done compiling lets get trouble with linking. NOTE:all selected libraries are defined in makerules/config.mk (LDFLAGS) * -ljpeg6b cannot be found, I'm guessing -ljpeg should be used instead * -lpng13 cannot be found, if using -lpng instead it uses lib/libpng.a of which the linker says lib/libpng.a: file format not recognized; treating as linker script which of course fails miserably, so lets put my money on -lpng12 instead. But we're still having problems now: g++ -m32 -DVERSION=\2.0.5\ -DYY_STATIC -I.. -I../.. -IC:\devpkg/include -fpermissive -Wall -O0 -g3 -DDEBUG -mwindows -DWIN32 -o warzone2100.exe ai.o aiexperience.o astar.o action.o advvis.o atmos.o bridge.o buildpos.o cdspan.o cheat.o cluster.o cmddroid.o combat.o component.o console.o data.o design.o difficulty.o disp2d.o display.o droid.o e3demo.o edit2d.o edit3d.o effects.o environ.o fpath.o feature.o findpath.o formation.o frontend.o gateway.o gatewayroute.o gatewaysup.o geometry.o group.o hci.o init.o intdisplay.o intimage.o intorder.o intelmap.o keybind.o keymap.o level_lexer.o levels.o lighting.o loop.o map.o mapdisplay.o mapgrid.o mechanics.o message.o miscimd.o move.o multiint.o multimenu.o multiopt.o multisync.o multibot.o multistat.o objmem.o objects.o optimisepath.o order.o player.o powercrypt.o radar.o raycast.o research.o scores.o scriptai.o scriptcb.o scriptextern.o scriptfuncs.o scriptobj.o scripttabs.o scriptvals.o scriptvals_parser.o scriptvals_lexer.o selection.o stats.o text.o texture.o transporter.o visibility.o warcam.o wrappers.o ani.o arrow.o aud.o audio_id.o bucket3d.o clparse.o configuration.o csnap.o display3d.o drive.o function.o game.o ingameop.o keyedit.o loadsave.o main.o mission.o multigifts.o multijoin.o multilimit.o multiplay.o multistruct.o oprint.o power.o projectile.o seqdisp.o structure.o target.o warzoneconfig.o ../lib/libframework.a ../lib/libgamelib.a ../lib/libivis_common.a ../lib/libivis_opengl.a ../lib/libnetplay.a ../lib/libscript.a ../lib/libsequence.a ../lib/libsound.a ../lib/libwidget.a ../win32/warzone2100.o -LC:\devpkg/lib -lmingw32 -lglu32 -lopengl32 -lopenal32 -ljpeg -lpng12 -lmad -lvorbisfile -lvorbis -logg -lphysfs -lSDLmain -lSDL -lSDL_net C:\devpkg/lib/libpng12.a(pngread.o)(.text+0x279):pngread.c: undefined reference to `inflateInit_' C:\devpkg/lib/libpng12.a(pngread.o)(.text+0x5b5):pngread.c: undefined reference to `inflateInit_' C:\devpkg/lib/libpng12.a(pngread.o)(.text+0x1283):pngread.c: undefined reference to `inflate' C:\devpkg/lib/libpng12.a(pngread.o)(.text+0x214d):pngread.c: undefined reference to `inflateEnd' C:\devpkg/lib/libpng12.a(png.o)(.text+0x1bc):png.c: undefined reference to `crc32' C:\devpkg/lib/libpng12.a(png.o)(.text+0x23b):png.c: undefined reference to `crc32' C:\devpkg/lib/libpng12.a(png.o)(.text+0xd29):png.c: undefined reference to `inflateReset' C:\devpkg/lib/libpng12.a(pngrutil.o)(.text+0x33d):pngrutil.c: undefined reference to `inflate' C:\devpkg/lib/libpng12.a(pngrutil.o)(.text+0x3a0):pngrutil.c: undefined reference to `inflateReset' C:\devpkg/lib/libpng12.a(pngrutil.o)(.text+0x753):pngrutil.c: undefined reference to `inflateReset'
Re: [Warzone-dev] warzone devpackage
Dennis Schridde schreef: Am Mittwoch, 27. Dezember 2006 20:03 schrieb Giel van Schijndel: Dennis Schridde schreef: Am Mittwoch, 27. Dezember 2006 18:49 schrieb Giel van Schijndel: Dennis Schridde schreef: Am Mittwoch, 27. Dezember 2006 18:11 schrieb Giel van Schijndel: I assume that you've modified the warzone devpackage for that ( this one: http://download.gna.org/warzone/development/warzone-devpkg.7z ), would you care to upload the version you're using there? Allready done, just didn't announce it yet. (MSVC package is not yet uploaded.) http://download.gna.org/warzone/development/warzone-devpkg-mingw32.7z The warzone-devpkg.7z will vanish when I uploaded the MSVC pkg. Well that new MinGW devpackage doesn't work all to nice. It gives me a whole bunch of png related compiler errors. g++ -m32 -DVERSION=\2.0.5\ -DYY_STATIC -I.. -I../.. -IC:\devpkg/include -fpermissive -Wall -O0 -g3 -DDEBUG -mwindows -DWIN32 -c -opcx.o pcx.c In file included from pcx.c:1: C:/devpkg/include/png.h:1: error: expected constructor, destructor, or type conversion before '/' token C:/devpkg/include/png.h:1: error: expected `,' or `;' before '/' token In file included from pcx.c:1: C:/devpkg/include/png.h:1:15: warning: no newline at end of file Did you have a look at that png.h? Could it be related to DOS/UNIX lineendings? No, GCC (and as such MinGW) doesn't care about line-endings as long as they're the same throughout the file. When looking at that last error message you quoted it also indicates a line number of 1, which suggests the last line is nrl 1. Meaning there is only one line there, so I went to watch there and this where its contents exactly: libpng12/png.h (without quotes). While it should (most likely) be this: #include libpng12/png.h The include/png.h in the devpkg you got only contains libpng12/png.h ??? That's very odd, since mine is a full featured C header... So that's an easy fix, that fixes compiling. So now we're done compiling lets get trouble with linking. NOTE:all selected libraries are defined in makerules/config.mk (LDFLAGS) * -ljpeg6b cannot be found, I'm guessing -ljpeg should be used instead * -lpng13 cannot be found, if using -lpng instead it uses lib/libpng.a of which the linker says lib/libpng.a: file format not recognized; treating as linker script which of course fails miserably, so lets put my money on -lpng12 instead. I think it should be -lpng, without any version number... Well the linker doesn't recognize lib/libpng.a as a linklibrary so that doesn't help. I am instead using -lpng12 now, that does work. There seems to be some Windows library missing. I guess those were pulled in automatically by the DLLs or something... Try adding -lwsock32 -lwinmm to the end... While adding the *both* of those did help (i.e. they're both needed apparently) I'm now left with some libpng related errors. These however are fixed by appending a simple -lz to the linker list. So, provided that you modify the devpackage to have a correct include/png.h file (i.e. *with* #include directive in front of the file name that is to be included) wz should be compilable and linkable. The latter (linking) however requires the attached patch. Then for the purpose of actually running the executable it would be nice if you'd also include OpenAL32.dll and wrap_oal.dll into the devpackage. -- Giel Index: makerules/configure.mk === --- makerules/configure.mk (revision 576) +++ makerules/configure.mk (working copy) @@ -74,7 +74,7 @@ EXEEXT=.exe WINDRES=windres CFLAGS+=-mwindows -DWIN32 -LDFLAGS+=-lmingw32 -lglu32 -lopengl32 -lopenal32 -ljpeg6b -lpng13 +LDFLAGS+=-lmingw32 -lglu32 -lopengl32 -lopenal32 -ljpeg -lpng12 -lz else DIRSEP=/ RMF=rm -f @@ -85,4 +85,9 @@ LDFLAGS+=-lmad -lvorbisfile -lvorbis -logg -lphysfs -lSDLmain -lSDL -lSDL_net +# MS Winsock and winmm are still required by SDL on MSW +ifeq ($(strip $(PLATFORM)),windows) +LDFLAGS+=-lwsock32 -lwinmm +endif + include $(MAKERULES)/common.mk signature.asc Description: OpenPGP digital signature ___ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev
Re: [Warzone-dev] warzone devpackage
Am Mittwoch, 27. Dezember 2006 21:24 schrieb Giel van Schijndel: Dennis Schridde schreef: Am Mittwoch, 27. Dezember 2006 20:03 schrieb Giel van Schijndel: Dennis Schridde schreef: Am Mittwoch, 27. Dezember 2006 18:49 schrieb Giel van Schijndel: Dennis Schridde schreef: Am Mittwoch, 27. Dezember 2006 18:11 schrieb Giel van Schijndel: I assume that you've modified the warzone devpackage for that ( this one: http://download.gna.org/warzone/development/warzone-devpkg.7z ), would you care to upload the version you're using there? Allready done, just didn't announce it yet. (MSVC package is not yet uploaded.) http://download.gna.org/warzone/development/warzone-devpkg-mingw32.7z The warzone-devpkg.7z will vanish when I uploaded the MSVC pkg. Well that new MinGW devpackage doesn't work all to nice. It gives me a whole bunch of png related compiler errors. g++ -m32 -DVERSION=\2.0.5\ -DYY_STATIC -I.. -I../.. -IC:\devpkg/include -fpermissive -Wall -O0 -g3 -DDEBUG -mwindows -DWIN32 -c -opcx.o pcx.c In file included from pcx.c:1: C:/devpkg/include/png.h:1: error: expected constructor, destructor, or type conversion before '/' token C:/devpkg/include/png.h:1: error: expected `,' or `;' before '/' token In file included from pcx.c:1: C:/devpkg/include/png.h:1:15: warning: no newline at end of file Did you have a look at that png.h? Could it be related to DOS/UNIX lineendings? No, GCC (and as such MinGW) doesn't care about line-endings as long as they're the same throughout the file. When looking at that last error message you quoted it also indicates a line number of 1, which suggests the last line is nrl 1. Meaning there is only one line there, so I went to watch there and this where its contents exactly: libpng12/png.h (without quotes). While it should (most likely) be this: #include libpng12/png.h The include/png.h in the devpkg you got only contains libpng12/png.h ??? That's very odd, since mine is a full featured C header... So that's an easy fix, that fixes compiling. So now we're done compiling lets get trouble with linking. NOTE:all selected libraries are defined in makerules/config.mk (LDFLAGS) * -ljpeg6b cannot be found, I'm guessing -ljpeg should be used instead * -lpng13 cannot be found, if using -lpng instead it uses lib/libpng.a of which the linker says lib/libpng.a: file format not recognized; treating as linker script which of course fails miserably, so lets put my money on -lpng12 instead. I think it should be -lpng, without any version number... Well the linker doesn't recognize lib/libpng.a as a linklibrary so that doesn't help. I am instead using -lpng12 now, that does work. I found the issues: lrwxrwxrwx 1 sevendays users 10 2006-12-24 01:14 libpng.a - libpng12.a lrwxrwxrwx 1 sevendays users14 2006-12-24 01:14 png.h - libpng12/png.h I'll upload a corrected version of the devpkg... There seems to be some Windows library missing. I guess those were pulled in automatically by the DLLs or something... Try adding -lwsock32 -lwinmm to the end... While adding the *both* of those did help (i.e. they're both needed apparently) I'm now left with some libpng related errors. These however are fixed by appending a simple -lz to the linker list. So, provided that you modify the devpackage to have a correct include/png.h file (i.e. *with* #include directive in front of the file name that is to be included) wz should be compilable and linkable. The latter (linking) however requires the attached patch. Then for the purpose of actually running the executable it would be nice if you'd also include OpenAL32.dll and wrap_oal.dll into the devpackage. -- Giel pgpqDHQJ5CjLn.pgp Description: PGP signature ___ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev