View Full Version : Compilation error in png function
quakelinux
November 6th, 2005, 01:02 AM
Hello !
I have downloaded the latest cvs of doomlegacy c++, but i have got errors when i want to compile it :
make -C video
make[1]: Entering directory `/home/util3001/DOOM2_CPP/doomlegacy_c++/video'
g++-3.3.4 -c -g -O0 -Wall -DLINUX -DSDL -DHWRENDER -I../include png.cpp -o ../objs/png.o
png.cpp: In member function `byte* PNGTexture::ReadData(bool)':
png.cpp:161: error: invalid conversion from `Uint32*' to `png_uint_32*'
png.cpp:161: error: invalid conversion from `Uint32*' to `png_uint_32*'
make[1]: *** [../objs/png.o] Erreur 1
make[1]: Leaving directory `/home/util3001/DOOM2_CPP/doomlegacy_c++/video'
make: *** [video] Erreur 2
How to resolve this problem ?
Thanks in advance !
smite-meister
November 6th, 2005, 10:28 AM
png.cpp:161: error: invalid conversion from `Uint32*' to `png_uint_32*'
png.cpp:161: error: invalid conversion from `Uint32*' to `png_uint_32*'
It seems that g++ 3.3.6 and newer are a bit stricter with typedefs. Fixed.
If you want you can fix it by just changing Uint32 to png_uint_32.
quakelinux
November 6th, 2005, 01:14 PM
Hello !
Thanks, the compilation is a success, but when I copy the file legacy.wad (http://ovh.dl.sourceforge.net/sourceforge/doomlegacy/legacy.wad.gz) in the same directory that doom2.wad and ./Legacy, I got an other error :
stderr.txt :
Error: Your legacy.wad file is version 0.0, you need version 1.99
Use the legacy.wad coming from the same zip file as this executable
Use -noversioncheck to remove this check,
but this can cause Legacy to crash
And I use ./Legacy -noversioncheck, I got this error :
stderr.txt :
Error: Texturecache: New default_item 'DEF_TEX' not found!
Any idea ?
Thanks in advance !!
smite-meister
November 7th, 2005, 04:55 AM
Error: Your legacy.wad file is version 0.0, you need version 1.99
Use the legacy.wad coming from the same zip file as this executable
Read docs/compiling.html.
Basically you need to copy the old legacy.wad to your doomlegacy_c++ directory and say
"make wad", which builds an updated version of legacy.wad to the directory wad/. Use it instead
and everything should work.
quakelinux
November 7th, 2005, 05:41 AM
Hello !
Thanks a lot for your tips !!
I made a tutorial to compile and to install Doom Legacy c++ :
http://sitelibre.free.fr/doom2/
I hope it will be useful for other people !! (It is a french, sorry !!)
smite-meister
November 8th, 2005, 03:06 AM
I made a tutorial to compile and to install Doom Legacy c++ :
http://sitelibre.free.fr/doom2/
I think you can remove the png_uint_32 hint, I fixed the bug and committed the change to the CVS.
Also, the OpenTNL distribution includes libtomcrypt source and when you type "make", it should build both libtnl.a and libtomcrypt.a.
There may be a small problem with newer g++ versions and libtomcrypt, namely the new reserved names such as "round", which appear in the libtomcrypt source *ugh* . This you can fix simply by adding a
#define round round_xxxxxx
directive or something similar to the affected libtomcrypt files...
vBulletin® v3.8.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.