error compiling in PlayerCorpse.cpp
greetings,
I dig around trying to see if someone had a similar problem but failed on it so first post here. I'm very new too this so if I need to post more information please let me know. Code:
gcc -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wno-deprecated -Wcomment -Wcast-align -O -g -march=i686 -pthread -pipe -D_GNU_SOURCE -DINVERSEXY -DFX -DZONE -DEQDEBUG=5 -DCATCH_CRASH -DNO_PIDLOG -DSHAREMEM -DFIELD_ITEMS -DCOMBINED -DAPP_OPCODE_SIZE=2 -Di386 -DEMBPERL -DEMBPERL_PLUGIN -DHAS_UNION_SEMUN -I/usr/include/mysql -DBIG_JOINS=1 -fno-strict-aliasing -DUNIV_LINUX -DUNIV_LINUX -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/perl/5.10/CORE PlayerCorpse.cpp -o PlayerCorpse.o |
Hmm, I don't have a Linux machine to compile on at the moment, but looking at the code those types seem correct and it should match that function call. It does compile correctly with Visual Studio on Windows.
Did you clean before compiling? You might try changing the code in PlayerCorpse.cpp at line 406 to something like this and see if it throws a more useful error about the conversion, but it should just work. Code:
if(cursor) { |
ok it compiles without the previous error now, thanks
|
I had the same issue with PlayerCorpse.cpp as Cerbere did and the changes lerxst2112 mention fixed that part.
However I am stuck on another issue, dont mean to hijack this thread.. Code:
QuestParserCollection.cpp:194: error: ‘class QuestInterface’ has no member named ‘LoadScript’ |
Goto the makefile.common and take out the questinterface.o stuff it's not yet needed to compile but I didn't want to lose it so i committed it. (sorry!)
I'm putting through a fix for the playercorpse error atm. |
Honestly, the PlayerCorpse.cpp error didn't make sense to me, but I'm sure somewhere in a dark corner of the C++ standard there's an annoying reason for it and someone that could drone on for hours to explain and justify it. :)
Reminds me of the old days trying to write code that worked on Windows, XBox, PS2, and Gamecube. That was a set of compilers that could never agree on anything. |
I typically compile on windows and msvc is fairly good at just overlooking some of these things; wading into gcc is always an adventure in what standard does it want to enforce now. That said I also fixed the QuestInterface errors with any luck everything works properly again.
|
thanks, at revision 1896 it's flawless on a debian squeeze using gcc 4.4.5
|
Thanks KLS, your new revision worked (almost flawlessly), it was still throwing
Code:
make[1]: *** [QuestParserCollection.o] Error 1 I am having a bit of trouble with the LoginServer compile though.. /cry lol Code:
Client.cpp: In member function ‘void Client::Handle_SessionReady(const char*, unsigned int)’: Code:
unsigned int mode = *((unsigned int*)data); Code:
gcc -o EQEmuLoginServer Client.o ClientManager.o Config.o DatabaseMySQL.o ErrorLog.o Main.o ServerManager.o WorldServer.o .obj/BasePacket.o .obj/Condition.o .obj/CRC16.o .obj/crc32.o .obj/debug.o .obj/emu_opcodes.o .obj/EmuTCPConnection.o .obj/EmuTCPServer.o .obj/EQPacket.o .obj/EQStream.o .obj/EQStreamFactory.o .obj/logsys.o .obj/logsys_eqemu.o .obj/misc.o .obj/MiscFunctions.o .obj/Mutex.o .obj/opcodemgr.o .obj/packet_dump.o .obj/packet_functions.o .obj/rdtsc.o .obj/TCPConnection.o .obj/TCPServer.o .obj/timeoutmgr.o .obj/timer.o .obj/unix.o -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wno-deprecated -Wcomment -Wcast-align -O -g -pthread -pipe -DEQLAUNCH -DEQDEBUG=5 -I/usr/include/mysql -DBIG_JOINS=1 -fno-strict-aliasing -DUNIV_LINUX -DUNIV_LINUX -rdynamic -L. -lstdc++ -ldl -Wl,-Bsymbolic-functions -rdynamic -L/usr/lib/mysql -lmysqlclient -lEQEmuAuthCrypto -lcryptopp Any thoughts? I'll be here all day lol... |
The namespace issue results from gcc not implementing a nice c++0x feature involving enums.
Your last error is strange. If I just paste your command into my console it links EQEmuLoginServer just fine, in fact it appears to be identical to what I get when I run make, as it should be. Makefiles can get picky about line delimiters and tabs so you might try getting a fresh makefile from svn if you've made any changes, or just paste your own command back into console in the appropriate directory and see what happens. |
Two steps forward, one step back..
I decided to start fresh and checkout a fresh copy.. Code:
wiggmpk@LUGGS-ASN:~/Software/eqemulator/projecteqemu$ make Some other force outside of the physical existence we occupy says no.. |
It just keeps throwing em at me.. Wish it was candy..
Fix one, new one, fix one, new one.. Code:
NPCTypes.cpp:42: warning: ‘DLLLoadNPCTypes’ initialized and declared ‘extern’ |
All times are GMT -4. The time now is 02:32 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.