Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Linux Servers

Support::Linux Servers Support forum for Linux EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 05-09-2011, 03:16 AM
cerbere
Fire Beetle
 
Join Date: May 2011
Posts: 9
Default 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
PlayerCorpse.cpp: In constructor âCorpse::Corpse(Client*, sint32)â:
PlayerCorpse.cpp:349: warning: suggest parentheses around â&&â within â||â
PlayerCorpse.cpp:409: error: no matching function for call to âZoneDatabase::SaveCursor(int32, iter_queue, iter_queue)â
../common/shareddb.h:48: note: candidates are: bool SharedDatabase::SaveCursor(int32, std::_List_const_iterator<ItemInst*>&, std::_List_const_iterator<ItemInst*>&)
PlayerCorpse.cpp: In member function âvoid Corpse::LootItem(Client*, const EQApplicationPacket*)â:
PlayerCorpse.cpp:1145: warning: comparison between signed and unsigned integer expressions
make[1]: *** [PlayerCorpse.o] Error 1
make[1]: Leaving directory `/home/lotso/eqemulator/projecteqemu/zone'
make: *** [all] Error 2
Reply With Quote
  #2  
Old 05-09-2011, 07:21 AM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

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) {
    std::list<ItemInst*>::const_iterator s=client->GetInv().cursor_begin(), e=client->GetInv().cursor_end();
    database.SaveCursor(client->CharacterID(), 
         s, 
         e);
}

Last edited by lerxst2112; 05-09-2011 at 07:22 AM.. Reason: formatting
Reply With Quote
  #3  
Old 05-09-2011, 08:17 AM
cerbere
Fire Beetle
 
Join Date: May 2011
Posts: 9
Default

ok it compiles without the previous error now, thanks
Reply With Quote
  #4  
Old 05-09-2011, 02:00 PM
WIGGMPk
Fire Beetle
 
Join Date: Apr 2011
Posts: 8
Default

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’
QuestParserCollection.cpp:205: error: ‘class QuestInterface’ has no member named ‘LoadDefaultScript’
QuestParserCollection.cpp: In member function ‘QuestStatus QuestParserCollection::LoadPlayerQuest(std::string)’:
QuestParserCollection.cpp:222: error: ‘class QuestInterface’ has no member named ‘LoadPlayerScript’
QuestParserCollection.cpp:233: error: ‘class QuestInterface’ has no member named ‘LoadDefaultPlayerScript’
QuestParserCollection.cpp: In member function ‘QuestStatus QuestParserCollection::LoadItemQuest(std::string)’:
QuestParserCollection.cpp:250: error: ‘class QuestInterface’ has no member named ‘LoadItemScript’
QuestParserCollection.cpp:261: error: ‘class QuestInterface’ has no member named ‘LoadDefaultItemScript’
QuestParserCollection.cpp: In member function ‘QuestStatus QuestParserCollection::LoadSpellQuest(uint32_t)’:
QuestParserCollection.cpp:278: error: ‘class QuestInterface’ has no member named ‘LoadSpellScript’
QuestParserCollection.cpp:289: error: ‘class QuestInterface’ has no member named ‘LoadDefaultSpellScript’
QuestParserCollection.cpp: In member function ‘bool QuestParserCollection::HaveScriptFunction(const char*, uint32_t, const char*)’:
QuestParserCollection.cpp:303: warning: enumeration value ‘Unloaded’ not handled in switch
QuestParserCollection.cpp:303: warning: enumeration value ‘FailedToLoad’ not handled in switch
QuestParserCollection.cpp: In member function ‘bool QuestParserCollection::HavePlayerScriptFunction(const char*, const char*)’:
QuestParserCollection.cpp:316: warning: enumeration value ‘Unloaded’ not handled in switch
QuestParserCollection.cpp:316: warning: enumeration value ‘FailedToLoad’ not handled in switch
QuestParserCollection.cpp: In member function ‘bool QuestParserCollection::HaveItemScriptFunction(QuestEventID, ItemInst*, const char*)’:
QuestParserCollection.cpp:338: warning: enumeration value ‘Unloaded’ not handled in switch
QuestParserCollection.cpp:338: warning: enumeration value ‘FailedToLoad’ not handled in switch
QuestParserCollection.cpp: In member function ‘bool QuestParserCollection::HaveSpellScriptFunction(uint32_t, const char*)’:
QuestParserCollection.cpp:353: warning: enumeration value ‘Unloaded’ not handled in switch
QuestParserCollection.cpp:353: warning: enumeration value ‘FailedToLoad’ not handled in switch
make[1]: *** [QuestParserCollection.o] Error 1
make[1]: Leaving directory `/home/wiggmpk/Software/EQEmuServer/zone'
make: *** [all] Error 2
Reply With Quote
  #5  
Old 05-10-2011, 12:38 AM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

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.
Reply With Quote
  #6  
Old 05-10-2011, 01:33 AM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

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.
Reply With Quote
  #7  
Old 05-10-2011, 02:06 AM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

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.
Reply With Quote
  #8  
Old 05-10-2011, 03:34 AM
cerbere
Fire Beetle
 
Join Date: May 2011
Posts: 9
Default

thanks, at revision 1896 it's flawless on a debian squeeze using gcc 4.4.5
Reply With Quote
  #9  
Old 05-11-2011, 12:44 PM
WIGGMPk
Fire Beetle
 
Join Date: Apr 2011
Posts: 8
Default

Thanks KLS, your new revision worked (almost flawlessly), it was still throwing

Code:
make[1]: *** [QuestParserCollection.o] Error 1
Which was easily fixed by taking QuestParserCollection.o out of the makefile.common.

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)’:
Client.cpp:130: error: ‘LoginMode’ is not a class or namespace
make: *** [Client.o] Error 1
I did some searching on the forums here and found this fix, which for some reason didnt work last night, but when I woke up this morning apparently it fixed itself.

Code:
        unsigned int mode = *((unsigned int*)data);
-       if(mode == (unsigned int)LoginMode::lm_from_world)
+       if(mode == (unsigned int) lm_from_world)
        {
                log->Log(log_network, "Session ready indicated logged in from world(unsupported feature), disconnecting.");
                connection->Close();
But I am still caught on an issue that I cant figure out myself cause I'm the suck lol..

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
/usr/bin/ld: 1: Syntax error: newline unexpected
collect2: ld returned 2 exit status
make: *** [EQEmuLoginServer] Error 1
Even though libcryptopp.a & libEQEmuAuthCrypto.a were placed in EQEmuLoginServer, I had to copy them to /usr/bin/ld for the compiler to find them.

Any thoughts? I'll be here all day lol...
Reply With Quote
  #10  
Old 05-11-2011, 04:27 PM
Tabasco's Avatar
Tabasco
Discordant
 
Join Date: Sep 2009
Posts: 270
Default

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.
Reply With Quote
  #11  
Old 05-11-2011, 05:42 PM
WIGGMPk
Fire Beetle
 
Join Date: Apr 2011
Posts: 8
Default

Two steps forward, one step back..

I decided to start fresh and checkout a fresh copy..

Code:
wiggmpk@LUGGS-ASN:~/Software/eqemulator/projecteqemu$ make
make -C EMuShareMem
make[1]: Entering directory `/home/wiggmpk/Software/eqemulator/projecteqemu/EMuShareMem'
gcc -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wno-deprecated -Wcomment -Wcast-align -DDEBUG=1 -DCATCH_CRASH -g -fPIC -O2 -D_GNU_SOURCE -DINVERSEXY -DFX  MMFMutex.cpp -o MMFMutex.o
gcc -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wno-deprecated -Wcomment -Wcast-align -DDEBUG=1 -DCATCH_CRASH -g -fPIC -O2 -D_GNU_SOURCE -DINVERSEXY -DFX  Doors.cpp -o Doors.o
gcc -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wno-deprecated -Wcomment -Wcast-align -DDEBUG=1 -DCATCH_CRASH -g -fPIC -O2 -D_GNU_SOURCE -DINVERSEXY -DFX  Items.cpp -o Items.o
gcc -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wno-deprecated -Wcomment -Wcast-align -DDEBUG=1 -DCATCH_CRASH -g -fPIC -O2 -D_GNU_SOURCE -DINVERSEXY -DFX  Spells.cpp -o Spells.o
gcc -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wno-deprecated -Wcomment -Wcast-align -DDEBUG=1 -DCATCH_CRASH -g -fPIC -O2 -D_GNU_SOURCE -DINVERSEXY -DFX  NPCFactionLists.cpp -o NPCFactionLists.o
gcc -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wno-deprecated -Wcomment -Wcast-align -DDEBUG=1 -DCATCH_CRASH -g -fPIC -O2 -D_GNU_SOURCE -DINVERSEXY -DFX  MMF.cpp -o MMF.o
MMF.cpp: In member function ‘bool MMF::Open(const char*, int32)’:
MMF.cpp:213: warning: comparison between signed and unsigned integer expressions
gcc -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wno-deprecated -Wcomment -Wcast-align -DDEBUG=1 -DCATCH_CRASH -g -fPIC -O2 -D_GNU_SOURCE -DINVERSEXY -DFX  Loot.cpp -o Loot.o
gcc -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wno-deprecated -Wcomment -Wcast-align -DDEBUG=1 -DCATCH_CRASH -g -fPIC -O2 -D_GNU_SOURCE -DINVERSEXY -DFX  Opcodes.cpp -o Opcodes.o
gcc -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wno-deprecated -Wcomment -Wcast-align -DDEBUG=1 -DCATCH_CRASH -g -fPIC -O2 -D_GNU_SOURCE -DINVERSEXY -DFX  SkillCaps.cpp -o SkillCaps.o
gcc -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wno-deprecated -Wcomment -Wcast-align -DDEBUG=1 -DCATCH_CRASH -g -fPIC -O2 -D_GNU_SOURCE -DINVERSEXY -DFX  DLLMain.cpp -o DLLMain.o
mkdir -p .obj
gcc -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wno-deprecated -Wcomment -Wcast-align -DDEBUG=1 -DCATCH_CRASH -g -fPIC -O2 -D_GNU_SOURCE -DINVERSEXY -DFX  -c ../common/timer.cpp -o .obj/timer.o
mkdir -p .obj
gcc -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wno-deprecated -Wcomment -Wcast-align -DDEBUG=1 -DCATCH_CRASH -g -fPIC -O2 -D_GNU_SOURCE -DINVERSEXY -DFX  -c ../common/unix.cpp -o .obj/unix.o
gcc -g -shared -Wl,-soname,libEMuShareMem.so -o libEMuShareMem.so MMFMutex.o Doors.o Items.o Spells.o NPCFactionLists.o MMF.o Loot.o Opcodes.o SkillCaps.o DLLMain.o .obj/timer.o .obj/unix.o -L. -lstdc++ 
/usr/bin/ld: 1: Syntax error: newline unexpected
collect2: ld returned 2 exit status
make[1]: *** [libEMuShareMem.so] Error 1
make[1]: Leaving directory `/home/wiggmpk/Software/eqemulator/projecteqemu/EMuShareMem'
make: *** [all] Error 2
I'm just not allowed to play EQ..
Some other force outside of the physical existence we occupy says no..
Reply With Quote
  #12  
Old 05-11-2011, 06:29 PM
WIGGMPk
Fire Beetle
 
Join Date: Apr 2011
Posts: 8
Default

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’
NPCTypes.cpp:42: error: ‘CALLBACK_DBLoadNPCTypes’ was not declared in this scope
NPCTypes.cpp:42: error: expected primary-expression before ‘iNPCTypeStructSize’
NPCTypes.cpp:42: error: expected primary-expression before ‘*’ token
NPCTypes.cpp:42: error: ‘iNPCTypesCount’ was not declared in this scope
NPCTypes.cpp:42: error: expected primary-expression before ‘*’ token
NPCTypes.cpp:42: error: ‘iMaxNPCTypeID’ was not declared in this scope
NPCTypes.cpp:42: error: initializer expression list treated as compound expression
NPCTypes.cpp:42: error: expected ‘,’ or ‘;’ before ‘{’ token
make[1]: *** [NPCTypes.o] Error 1
make[1]: Leaving directory `/home/wiggmpk/Software/eqemulator/projecteqemu/EMuShareMem'
make: *** [all] Error 2
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 11:37 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3