EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Archive::Linux Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=618)
-   -   Compile probs on 2.4 Pre 6 (https://www.eqemulator.org/forums/showthread.php?t=729)

Stud 03-14-2002 05:21 PM

Compile probs on 2.4 Pre 6
 
Haven't had much chance to investigate yet, as I work tonight, but.....

Using RH 7.2 GCC 2.96 all errata patched

World compiles successfully

Zone errors with the following:

Red Hat Linux release 7.2 (Enigma)
Kernel 2.4.9-31 on an i686

# make
gcc -g -m486 -pthread -pipe -DLUCLIN -D_GNU_SOURCE -DFX -I/usr/local/mysql/inclu
de ../common/EQFragment.o ../common/EQPacket.o ../common/EQPacketManager.o ../c
ommon/timer.o ../common/database.o ../common/packet_dump.o ../common/packet_func
tions.o ../common/unix.o ../common/packet_dump_file.o ../common/Mutex.o ../commo
n/MiscFunctions.o ../common/serverinfo.o zone.o entity.o mob.o client.o client_p
rocess.o npc.o net.o spawn2.o attack.o hate_list.o worldserver.o spells.o spawng
roup.o ../common/moremath.o loottables.o faction.o ClientList.o Map.o Quest.o Pl
ayerCorpse.o petitions.o WesQuests.o -L. -lstdc++ -lm -lz -L/usr/local/mysql/lib
-lmysqlclient -o zone
client_process.o: In function `void safe_delete<unsigned char *>(unsigned char *
&)':
/root/eq/zone/../common/EQPacketManager.h(.text+0x33d7): undefined reference to
`GetLevelCon(unsigned char, unsigned char)'
npc.o: In function `NPC::Process(void)':
/root/eq/zone/npc.cpp:237: undefined reference to `EntityList::AddHateToCloseMob
s(NPC *, float, int)'
collect2: ld returned 1 exit status
make: *** [zone] Error 1

themax 03-14-2002 05:51 PM

same here :(

Trumpcard 03-14-2002 08:00 PM

Im getting this when compiling zone.

World compiles fine (had to add "using namespace std;" per Misanthrope and #include <stdarg.h> to find the va_ functions)

In file included from client_process.cpp:32:
petitions.h:89:6: warning: no newline at end of file
In file included from client_process.cpp:33:
NpcAI.h:17:6: warning: no newline at end of file
client.cpp:1785: warning: cast to pointer from integer of different size
client.cpp:1787: warning: cast to pointer from integer of different size
npc.cpp: In constructor `NPC::NPC(NPCType*, Spawn2*, float, float, float,
float, bool)':
npc.cpp:85: statement cannot resolve address of overloaded function
client_process.cpp: In member function `void Client::SetAttackTimer()':
client_process.cpp:2351: warning: passing `float' for argument 1 of `void
Timer::Start(unsigned int, bool)'
client_process.cpp:2358: warning: passing `float' for argument 1 of `void
Timer::Start(unsigned int, bool)'
client_process.cpp:2592:1: warning: no newline at end of file
make: *** [npc.o] Error 1
make: *** Waiting for unfinished jobs....


Stud,

try adding this include to npc.cpp

#include "entity.h"

Stud 03-15-2002 07:03 AM

nope, no soup for me!

theCoder 03-15-2002 07:45 AM

Here's a fix:
1) Edit the makefile and add 'NpcAI.o' to the end of the list of source files (in the SF variable). This is a new file in pre6, so I guess it didn't get added to the compile list.

2) Edit NpcAI.cpp and insert the following lines beginning at line 3:
Code:

#else
        // not needed in WIN32?  Not included in base download...
        #include <stdlib.h>

stdlib.h has to be included for rand(). It's that way on WIN32 also, so I don't know how it would compile on that platform either...

This will at least get it compiling (also do Trumpcard's fix to npc.cpp)... now off to test it :)

btw, I didn't have to do any changes regarding namespace or stdarg.h, but YMMV.

Trumpcard 03-15-2002 07:48 AM

not sure why im the only one having stdarg problems, im guessing the std includes between gcc 2.96 and 3 changed somewhere. I have to do the namespace fixes due to issues with gcc 3..

Stud 03-15-2002 10:28 AM

Gah! The makefile? Hehe, I never even checked it, wonder how long it would have taken me to find it this weekend, lol.

That did the trick, up and runnin now, thanks you two!

yngling 03-15-2002 10:07 PM

successful compile
 
Thank you to all ya'll for the details nedded to get this latest release to compile, good job!
Running server Sin-Axis , and lovin the improvements!


All times are GMT -4. The time now is 05:11 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.