Forum rules


Before adding a bug or feature request please check it is not already in the bug tracker or answered in the FAQ.



Compiling 43.2a - problems and casting

Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Compiling 43.2a - problems and casting
PostPosted: Sun Dec 19, 2010 6:36 pm 
User avatar
Burned to a crisp

Current Scorched3D Rank: Unranked





Joined: Sat May 13, 2006 9:24 am
Posts: 413
These are the errors i was facing compiling Scorched. I post them here because dont think these are bugs, and i am using a stone age compiler (gcc 4.0.2)

Code:
g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"scorched3d\" -DVERSION=\"43\" -DHAVE_OGG=1 -DHAVE_VSNPRINTF=1 -DHAVE_SNPRINTF=1 -DHAVE_VASPRINTF=1 -DHAVE_ASPRINTF=1 -DHAVE_ICONV=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ICONV_H=1 -I.  -I../../common/porting -I../../common -I../../client -I../../server -I../../launcher -I/usr/local/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -D__WXGTK__ -pthread -I/usr/include/freetype2 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/X11R6/include -I/usr/X11R6 -I/usr/local/include  -g -O2 -DS3D_DOCDIR=\"/usr/local/games/scorched3d/share/documentation\" -DS3D_DATADIR=\"/usr/local/games/scorched3d/share\" -DS3D_BINDIR=\"/usr/local/games/scorched3d/bin\" -MT fixed.o -MD -MP -MF .deps/fixed.Tpo -c -o fixed.o `test -f '../../common/common/fixed.cpp' || echo './'`../../common/common/fixed.cpp
../../common/common/fixed.cpp:48: error: 'LLONG_MAX' was not declared in this scope
../../common/common/fixed.cpp:49: error: 'LLONG_MIN' was not declared in this scope
make[3]: *** [fixed.o] Error 1
make[3]: Leaving directory `/home/naka/INSTALL/Scorched3d-43.2a/scorched/src/launcher/scorched'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/naka/INSTALL/Scorched3d-43.2a/scorched/src/launcher'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/naka/INSTALL/Scorched3d-43.2a/scorched/src'
make: *** [all-recursive] Error 1
[naka@P30 scorched]$                                               

------

g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"scorched3d\" -DVERSION=\"43\" -DHAVE_OGG=1 -DHAVE_VSNPRINTF=1 -DHAVE_SNPRINTF=1 -DHAVE_VASPRINTF=1 -DHAVE_ASPRINTF=1 -DHAVE_ICONV=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ICONV_H=1 -I.  -I../../common/porting -I../../common -I../../client -I../../server     -I/usr/include/freetype2   -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/X11R6/include -I/usr/X11R6 -I/usr/local/include  -g -O2 -DS3D_DOCDIR=\"/usr/local/games/scorched3d/share/documentation\" -DS3D_DATADIR=\"/usr/local/games/scorched3d/share\" -DS3D_BINDIR=\"/usr/local/games/scorched3d/bin\" -MT igd.o -MD -MP -MF .deps/igd.Tpo -c -o igd.o `test -f '../../server/igd/igd.cpp' || echo './'`../../server/igd/igd.cpp
../../server/igd/igd.cpp:410:2: warning: no newline at end of file
../../server/igd/igd.cpp: In member function 'bool igd::sendTCPRequest(igd::Location&, const std::string&, std::string&, std::string&)':
../../server/igd/igd.cpp:232: error: invalid conversion from 'const void*' to 'void*'
../../server/igd/igd.cpp:232: error:   initializing argument 2 of 'int SDLNet_TCP_Send(_TCPsocket*, void*, int)'
make[3]: *** [igd.o] Error 1
make[3]: Leaving directory `/home/naka/INSTALL/Scorched3d-43.2a/scorched/src/client/scorchedc'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/naka/INSTALL/Scorched3d-43.2a/scorched/src/client'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/naka/INSTALL/Scorched3d-43.2a/scorched/src'
make: *** [all-recursive] Error 1
[naka@P30 scorched]$   

-------------

g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"scorched3d\" -DVERSION=\"43\" -DHAVE_OGG=1 -DHAVE_VSNPRINTF=1 -DHAVE_SNPRINTF=1 -DHAVE_VASPRINTF=1 -DHAVE_ASPRINTF=1 -DHAVE_ICONV=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ICONV_H=1 -I.  -I../../common/porting -I../../common -I../../client -I../../server     -I/usr/include/freetype2   -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/X11R6/include -I/usr/X11R6 -I/usr/local/include  -g -O2 -DS3D_DOCDIR=\"/usr/local/games/scorched3d/share/documentation\" -DS3D_DATADIR=\"/usr/local/games/scorched3d/share\" -DS3D_BINDIR=\"/usr/local/games/scorched3d/bin\" -MT NetworkChatDialog.o -MD -MP -MF .deps/NetworkChatDialog.Tpo -c -o NetworkChatDialog.o `test -f '../dialogs/NetworkChatDialog.cpp' || echo './'`../dialogs/NetworkChatDialog.cpp
../dialogs/NetworkChatDialog.cpp:267:2: warning: no newline at end of file
../dialogs/NetworkChatDialog.cpp: In member function 'void NetworkChatDialog::sendMessage()':
../dialogs/NetworkChatDialog.cpp:209: error: invalid conversion from 'const void*' to 'void*'
../dialogs/NetworkChatDialog.cpp:209: error:   initializing argument 2 of 'int SDLNet_TCP_Send(_TCPsocket*, void*, int)'
make[3]: *** [NetworkChatDialog.o] Error 1
make[3]: Leaving directory `/home/naka/INSTALL/Scorched3d-43.2a/scorched/src/client/scorchedc'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/naka/INSTALL/Scorched3d-43.2a/scorched/src/client'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/naka/INSTALL/Scorched3d-43.2a/scorched/src'
make: *** [all-recursive] Error 1
[naka@P30 scorched]$                                   


the first one i was facing since 42.X. I managed to fix it myself by include into fixed.cpp
# define LLONG_MAX 9223372036854775807LL
# define LLONG_MIN (-LLONG_MAX - 1LL)
i have these defined into the system headers, but for some reason (due to the compiler version checking???) they wasnt include.

The last 2 i cast the calling to (void*), but i am not sure that is the correct way.
Anyway these issues can happen to others compilers/versions.


Top
 Profile  
 
 Post subject: Re: Compiling 43.2a - problems and casting
PostPosted: Mon Dec 20, 2010 2:10 am 
User avatar
Obliterated

Current Scorched3D Rank: Unranked








Joined: Wed Feb 16, 2005 1:26 am
Posts: 1583
Location: Some Where On Earth I Think
Why are you using such an old compiler? That version is 5 years old. :shock:
Image
"Always do right. This will gratify some people and astonish the rest."
Mark Twain


Top
 Profile  
 
 Post subject: Re: Compiling 43.2a - problems and casting
PostPosted: Tue Dec 21, 2010 6:30 pm 
User avatar
Site Admin
Not Signed Up For Stats

Joined: Mon Aug 04, 2003 4:09 pm
Posts: 4771
Location: Scotland
Looks like compiler differences. You may be able to fix the others by doing an explicit cast.

e.g. (void*) before the argument.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group