Log in

View Full Version : New CVS dump Windows compile issues


sonicintuition
05-02-2005, 12:32 AM
Greetings,

I downloaded the newest CVS dump of EQemu and was really excited to see that Lethal updated the project so that it would compile on windows. Unfortunately, it still refuses to compile, but this time for different reasons. EQmemshare.dll compiled fine with one warning. Cool. My problems lie in attempting compiles of world.exe and zone.exe (w/perl). I am using VS.NET 2K3.

When compiling world.exe, I get about 32 errors all having to do with EQnetwork.cpp. They are to the likes of "suchandsuch is not a member of EQstream". I figured I might just be missing a few files from the project, so I added the EQstream.cpp/.h because they weren't included - did not solve the problem. Is there some other files I need to add and if so, what?

When compiling zone.exe I get a whopping 435 errors. Many also had to do with the EQstream thing like above, and also most are (for example) like this: C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinSock2.h(1875): error C2375: 'ntohl' : redefinition; different linkage
I am assuming that I need to add something to the project, but I'm not sure and really confused. I've never had a problem with that type of error when compiling zone.exe in the past.

I've searched on this for a while and tried various things but nothing is working. I really hope its as simple as including files to the project. Any *helpful, polite* insight would be greatly appreciated. Thanks for your time.

Regards,
SI

Facet42
05-02-2005, 07:37 AM
You need to remove the EQNetwork.cpp file from the project as it has been moved into the EQStream.cpp file if I remember correctly.

sonicintuition
05-02-2005, 07:58 AM
Wow, thats it huh? Sheesh. Thanks a bunch. I'll edit this post if it works - just in case others run into the same issue.

EDIT: Okay, your solution did take care of the EQstream errors in both world and zone compiles, however now I get a whole slew of other errors, all dealing with WinSock2.h or WinSock.h - never had this problem before when compiling w/ VS.NET 2003, what gives? Anyone?

Regards,
SI

Sakrateri
05-13-2005, 02:27 AM
by remove eqnetwork.cpp do you mean just delete the file?

cavedude
05-13-2005, 06:49 AM
No, you have to remove it from the project.

Sarepean
05-14-2005, 02:09 AM
Every single winsock2.h error I receive in ANY compile comes from 5 or 6 files and they all start with this "perl_". For example, "perl_client" and stuff like that.

I think I've found the reason why those error out, but I can't find a way to fix it. The devs say that it was fixed in the development branch, but even that compiles with the same errors I was getting before. =/

Here's the post (I can't find quote, otherwise I'd quote it)

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

After some code inspection, I found out that both Apache-1.3.20 (os.h) and
mod_perl-1.26 (mod_perl.h) include <winsock2.h> BUT Perl-5.6.1
(/usr/perl/lib/CORE/sys/socket.h) includes <winsock.h>
As the result, compilation failed because of these 2 conflicting header file
inclusion. The include hierachy looks something like this:

Icon.h -> mod_perl.h -> winsock2.h and perl.h
perl.h -> sys/socket.h (in /perl/lib/CORE) -> winsock.h!!

In general, any mod_perl Apache modules (eg: Apache::Icon and FileMan) with C code would fail to compile due to the exact reason.

Any suggestions on how to get around this?

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


None of my other files have a problem with any winsock2.h or winsock.h complications. The way I understand it is that to fix this, I would either have to #define WIN_LEAN_AND_MEAN or have the #include winsock2.h call before any calls to icon.h or perl.h

I've installed my platform SDK as recommended by another thread and that didn't do anything for my problem. =/ I'm also running the latest service pack for Visual Studio 2003 .NET Pro.

Please Advise.
-Sarepean

cavedude
05-14-2005, 04:32 AM
WARNING: This is a rough hack so I take no responsiblity for what it may do to your system.

This is how I got zone with perl support to compile on my Windows XP/Visual Studio .Net 2003 system. I went in-game and did a fairly thorough check of standard game functions, perl functions, and server stability/speed and everything seemed alright.

First, edit C:\Perl\lib\CORE\sys\socket.h

Change the winsock.h include line to winsock2.h

Finally add this to perlparser.cpp right below the features.h include line:


#define WIN32_LEAN_AND_MEAN
#ifdef __GNUC__
# define Win32_Winsock
#endif


After it compiles you may wanna change socket.h back to normal, especially if you do other work with the perl source.

Sakrateri
05-15-2005, 02:37 AM
Im new to compiling , how would I go about removing it from the project ? or is that to complicated to explain here? anyways thanks for the reply

cavedude
05-15-2005, 03:19 AM
When you open Visual Studio to the left hand side, you'll see the project window with all the files listed (Visual Studio 6.0 requires you tab over.) Under both World and Zone Source Files EQNetwork.cpp will be listed. Just highlight it both times and and hit delete. If you want to be sure, also remove EQNetwork.h which is listed under World and Zone Header Files.

Sakrateri
05-15-2005, 06:41 AM
ok , with out that taken out I get about four errors having to do with EQstream but once I highlight it and remove it I get this

Linking...
client.obj : error LNK2001: unresolved external symbol "public: static unsigned char EQApplicationPacket::default_opcode_size" (?default_opcode_size@EQApplicationPacket@@2EA)
client.obj : error LNK2019: unresolved external symbol "protected: __thiscall EQPacket::EQPacket(unsigned short,unsigned char const *,unsigned int)" (??0EQPacket@@IAE@GPBEI@Z) referenced in function "public: __thiscall EQApplicationPacket::EQApplicationPacket(void)" (??0EQApplicationPacket@@QAE@XZ)
client.obj : error LNK2019: unresolved external symbol "public: __thiscall EQPacket::~EQPacket(void)" (??1EQPacket@@QAE@XZ) referenced in function $L109204
client.obj : error LNK2019: unresolved external symbol "public: void __thiscall EQApplicationPacket::SetOpcode(enum EmuOpcode)" (?SetOpcode@EQApplicationPacket@@QAEXW4EmuOpcode@@ @Z) referenced in function "public: __thiscall EQApplicationPacket::EQApplicationPacket(enum EmuOpcode)" (??0EQApplicationPacket@@QAE@W4EmuOpcode@@@Z)
client.obj : error LNK2019: unresolved external symbol "public: enum EmuOpcode const __thiscall EQApplicationPacket::GetOpcodeConst(void)const " (?GetOpcodeConst@EQApplicationPacket@@QBE?BW4EmuOp code@@XZ) referenced in function "public: enum EmuOpcode const __thiscall EQApplicationPacket::GetOpcode(void)const " (?GetOpcode@EQApplicationPacket@@QBE?BW4EmuOpcode@ @XZ)
packet_dump.obj : error LNK2001: unresolved external symbol "public: enum EmuOpcode const __thiscall EQApplicationPacket::GetOpcodeConst(void)const " (?GetOpcodeConst@EQApplicationPacket@@QBE?BW4EmuOp code@@XZ)
packet_dump_file.obj : error LNK2001: unresolved external symbol "public: enum EmuOpcode const __thiscall EQApplicationPacket::GetOpcodeConst(void)const " (?GetOpcodeConst@EQApplicationPacket@@QBE?BW4EmuOp code@@XZ)
client.obj : error LNK2019: unresolved external symbol "public: void __thiscall EQStream::SendDisconnect(void)" (?SendDisconnect@EQStream@@QAEXXZ) referenced in function "public: void __thiscall EQStream::Close(void)" (?Close@EQStream@@QAEXXZ)
client.obj : error LNK2019: unresolved external symbol "public: void __thiscall EQStream::QueuePacket(class EQApplicationPacket const *,bool)" (?QueuePacket@EQStream@@QAEXPBVEQApplicationPacket @@_N@Z) referenced in function "public: void __thiscall Client::QueuePacket(class EQApplicationPacket const *,bool)" (?QueuePacket@Client@@QAEXPBVEQApplicationPacket@@ _N@Z)
client.obj : error LNK2019: unresolved external symbol "public: class EQApplicationPacket * __thiscall EQStream::PopPacket(void)" (?PopPacket@EQStream@@QAEPAVEQApplicationPacket@@X Z) referenced in function "public: bool __thiscall Client::Process(void)" (?Process@Client@@QAE_NXZ)
console.obj : error LNK2001: unresolved external symbol "class OpcodeManager * EQOpcodeManager" (?EQOpcodeManager@@3PAVOpcodeManager@@A)
net.obj : error LNK2001: unresolved external symbol "class OpcodeManager * EQOpcodeManager" (?EQOpcodeManager@@3PAVOpcodeManager@@A)
net.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall OpcodeManager::SetOpcode(enum EmuOpcode,unsigned short)" (?SetOpcode@OpcodeManager@@UAEXW4EmuOpcode@@G@Z)
net.obj : error LNK2001: unresolved external symbol "public: virtual enum EmuOpcode __thiscall SharedOpcodeManager::EQToEmu(unsigned short)" (?EQToEmu@SharedOpcodeManager@@UAE?AW4EmuOpcode@@G @Z)
net.obj : error LNK2001: unresolved external symbol "public: virtual unsigned short __thiscall SharedOpcodeManager::EmuToEQ(enum EmuOpcode)" (?EmuToEQ@SharedOpcodeManager@@UAEGW4EmuOpcode@@@Z )
net.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall SharedOpcodeManager::ReloadOpcodes(char const *)" (?ReloadOpcodes@SharedOpcodeManager@@UAE_NPBD@Z)
net.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall SharedOpcodeManager::LoadOpcodes(char const *)" (?LoadOpcodes@SharedOpcodeManager@@UAE_NPBD@Z)
net.obj : error LNK2019: unresolved external symbol "public: __thiscall OpcodeManager::OpcodeManager(void)" (??0OpcodeManager@@QAE@XZ) referenced in function "public: __thiscall SharedOpcodeManager::SharedOpcodeManager(void)" (??0SharedOpcodeManager@@QAE@XZ)
net.obj : error LNK2019: unresolved external symbol "public: void __thiscall EQStreamFactory::Close(void)" (?Close@EQStreamFactory@@QAEXXZ) referenced in function _main
net.obj : error LNK2019: unresolved external symbol "public: class EQStream * __thiscall EQStreamFactory::Pop(void)" (?Pop@EQStreamFactory@@QAEPAVEQStream@@XZ) referenced in function _main
net.obj : error LNK2019: unresolved external symbol "public: bool __thiscall EQStreamFactory::Open(void)" (?Open@EQStreamFactory@@QAE_NXZ) referenced in function _main
net.obj : error LNK2019: unresolved external symbol "public: __thiscall EQStreamFactory::EQStreamFactory(enum EQStreamType,int)" (??0EQStreamFactory@@QAE@W4EQStreamType@@H@Z) referenced in function _$E1
EMuShareMem.obj : error LNK2019: unresolved external symbol "public: char const * __thiscall SharedLibrary::GetError(void)" (?GetError@SharedLibrary@@QAEPBDXZ) referenced in function "public: bool __thiscall LoadEMuShareMemDLL::Load(void)" (?Load@LoadEMuShareMemDLL@@QAE_NXZ)
EMuShareMem.obj : error LNK2019: unresolved external symbol "public: void * __thiscall SharedLibrary::GetSym(char const *)" (?GetSym@SharedLibrary@@QAEPAXPBD@Z) referenced in function "public: bool __thiscall LoadEMuShareMemDLL::Load(void)" (?Load@LoadEMuShareMemDLL@@QAE_NXZ)
EMuShareMem.obj : error LNK2019: unresolved external symbol "public: virtual bool __thiscall SharedLibrary::Load(char const *)" (?Load@SharedLibrary@@UAE_NPBD@Z) referenced in function "public: bool __thiscall LoadEMuShareMemDLL::Load(void)" (?Load@LoadEMuShareMemDLL@@QAE_NXZ)
EMuShareMem.obj : error LNK2019: unresolved external symbol "public: __thiscall SharedLibrary::SharedLibrary(void)" (??0SharedLibrary@@QAE@XZ) referenced in function "public: __thiscall LoadEMuShareMemDLL::LoadEMuShareMemDLL(void)" (??0LoadEMuShareMemDLL@@QAE@XZ)
EMuShareMem.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall SharedLibrary::Unload(void)" (?Unload@SharedLibrary@@UAEXXZ) referenced in function "public: virtual void __thiscall LoadEMuShareMemDLL::Unload(void)" (?Unload@LoadEMuShareMemDLL@@UAEXXZ)
EMuShareMem.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall SharedLibrary::~SharedLibrary(void)" (??1SharedLibrary@@UAE@XZ) referenced in function "public: virtual __thiscall LoadEMuShareMemDLL::~LoadEMuShareMemDLL(void)" (??1LoadEMuShareMemDLL@@UAE@XZ)
.\../build/World.exe : fatal error LNK1120: 25 unresolved externals


any idea why?

cavedude
05-15-2005, 07:13 AM
EQStream needs to be compiled :) WHat are the errors? Winsock?

Sakrateri
05-15-2005, 10:10 AM
and where would I get the source for eqstream from to compile it? and I assume if I do that hack you posted I can get rid of the errors there , thanks alot for your patience and time.

cavedude
05-15-2005, 10:21 AM
EQStream is included with the source under the common folder. Didn't you say you removed it from the project when it gave you errors? Looking at your last post with all the linking errors, you're also missing a lot of other files in your project. Are you using Visual Studio 2003? If so, re-grab the CVS and open the server.sln to compile the project. It should work fine. If you're using Visual Studio 6.0 or just can't get it to compile, I posted the perl enabled binaries here: http://eqemulator.net/forums/showthread.php?t=18556 and a database that will work with it here: http://eqemulator.net/forums/showthread.php?t=18564

Sakrateri
05-15-2005, 10:24 PM
no , I removed EQnetwork.cpp not Eqstream

Sakrateri
05-16-2005, 10:22 PM
Ok , I just went ahead and downloaded what you made up , works god so far except having problems wiit doors, like the PoK books take you just to another part of the zone your allready in and the portals in PoK just take you to another part of pok m I checked and it looks like they are all in correctly in the database . aany idea?

cavedude
05-17-2005, 12:01 AM
Same problem here. The portals work fine with the 0.6.0 version of this db, so either 0.6.1 made some changes to doors that I didn't compensate for, or 0.6.1 broke teleport doors. Either way, I'll look into a fix and post my progress in the db thread.

Sakrateri
05-17-2005, 12:26 AM
Ok thanks alot Cave , other then that this is much better then 6.0 especially the netcode , thanks again

cavedude
05-17-2005, 02:30 AM
It looks like the problem may be with MovePC when it's given a zone name instead of ID. I *think* so don't quote me on this that zoning was changed to use IDs instead of names in some places so that may be what's causing it. I'm working on a hack to at least get portals functional now.

Sakrateri
05-17-2005, 10:32 AM
Ok , not sure what I can do but any help you might need let me know ok

Belfedia
05-24-2005, 08:45 AM
Same problem than you, if you find a hack or a fix that was marvellous.
I see Teleport clicky item don't work also :(
In other thing, pet command don't work for me, anyone have this bug ?