PDA

View Full Version : Guys, I'm dyin' here


kenjutsuka
12-08-2006, 12:52 AM
I'm trying to get VS .NET 2k5 (non Express Edition) to run with no go. I keep getting different errors, first mysql_com.h (which is the same between any version, 4.0.23, 4.1, 5.0, made in 2000.) another with winsock.h, winsock2.h, the list keeps growing. I downloaded all of the suggested materials. I reinstalled VS so much I'm sick of it. I have tried all manners of versions, I've probably put an upwards of over 50 hours into getting the damn thing to compile. I followed BOTH of the instructions I found (http://www.eqemulator.net/wiki/wikka.php?wakka=DevVSExpress, &
http://www.thristam.com/stuff/tutorial/VS2K5_compile_windows.htm)
Nothing. Maybe I'm stupid? :confused: No idea. I'm following everything to the T. I even reset the directories for ALL of the common and zone files linked by ".../etc/etc.h", this is after trying all before. Maybe there's a godlike instruction guide I'm missing out on? Someone please clue me in.

BTW, I've used the plain 0.7.0 on through 0.7.0-934 builds, probably 5 different ones, not a single one compiled though. A variety of errors, but still, I repeated the said processes for each one, so they should have built, right? (Focuing on compiling the 934 build at the moment, as it's the latest)

LostZaphod
12-08-2006, 04:19 AM
Ok I run a machine that does not have mysql or perl installed, it is used only to compile the code.
I make directories that hold the necessary files to compile.

extract EQEmu-0.7.0-934 to c:\EQEmu-0.7.0-934
extract mysql (development version) to c:\mysql-4.0.23
extract perl to c:\perl

Go to the directory c:\mysql-4.0.23\zlib
double click zlib.dsw, when asked to convert the project answer yes.
Set the compile mode to "release" (in the solutions configuration drop down).
In the build menu, select build solution.
This will make c:\mysql-4.0.23\lib_release\zlib.lib

Make a directory named c:\EQEmu-0.7.0-934\mysql4
Copy these files to c:\EQEmu-0.7.0-934\mysql4

errmsg.h
mysql.h
mysqlclient.lib
mysqld_error.h
mysql_com.h
mysql_version.h
my_alloc.h
zconf.h
zlib.h
zlib.lib


Go to c:\perl and locate this file "BuildInfo.h", write down the path. Mine is "c:\perl\lib\core"

Ok now you have everything.
First you need to open "c:\EQEmu-0.7.0-934\zone\zone.vcproj" with notepad and
Search for all occurrences of "Releaseperl|win32" and replace with "Release|Win32" then save the file.
Now double click the solution file "c:\EQEmu-0.7.0-934\Server.sln" when asked to convert answer YES.

Set the compile mode to "release" (in the solutions configuration drop down).

Right click EMUShareMem and choose build.
It should compile without any errors.

Right click world, select properties and check/ set these values
c++, General, "Additional Includes Directories"
add ..\mysql4
add c:\perl\lib\core
add ..\common\socketlib
c++,preprocessor, add these items.... ,_EQDEBUG,EQDEBUG=5
linker, General, "Additional Library Directories"
add ..\mysql4
add ..\perl\lib\core
linker, Input, "Ignore Specific Library"
LIBCMT,LIBC,MSVCRT

click ok, then right click build.

Right click zone select properties and check/set these values
c++, General, "Additional Includes Directories"
add ..\mysql4
add ..\perl\lib\core

c++.preprocessor, change EQDEBUG=0 to EQDEBUG=5

linker, General, "Additional Library Directories"
add ..\mysql4
add ..\perl\lib\core

linker, Input, "Ignore Specific Library"
LIBCMT,LIBC,MSVCRT

Click ok, then right click build.

Last is you need to add a project to the solution (right click the solution name and select add an existing item)
add "c:\EQEmu-0.7.0-934\eqlaunch\eqlaunch.dsp
When asked to convert answer yes.
Close solution (exit all of the way out of the compiler)

Go to "c:\EQEmu-0.7.0-934\eqlaunch" and find the file "eqlaunch.vcproj" use notepad to edit this file

Rename these values inside of eqlaunch.vcproj
EQTCPServer.cpp to EmuTCPServer.cpp
EQTCPConnection.cpp to EmuTCPConnection.cpp

Save the file go back to c:\EQEmu-0.7.0-934\
Double click the solution file "c:\EQEmu-0.7.0-934\Server.sln"

Now right click eqlanuch and select properties and change / set these values

c++, General, "Warning Level"
set "Level 1 (/W1)"

Delete existing includes
add ..\mysql4

c++, Precompiled headers, "Precompiled header file"
..\Build\eqlaunch\release/eqlaunch.pch

c++,Output Files, "ASM List Location"
..\Build\eqlaunch\release/
c++,Output Files, "Object File Name"
..\Build\eqlaunch\release/
c++,Output Files, "Program Database File Name"
..\Build\eqlaunch\release/


Linker, General, "Additional Library Directories"
..\mysql4
Linker, General, "Output File"
..\Build/eqlaunch.exe

Linker,Input, Ignor liburary LIBCMTD

Then click ok and then right click and select build.
After all of this you should find these files
c:\EQEmu-0.7.0-934\build\world.exe
c:\EQEmu-0.7.0-934\build\zone.exe
c:\EQEmu-0.7.0-934\build\eqlaunch.exe
c:\EQEmu-0.7.0-934\build\EMuShareMem.dll

If you did not change the compile mode (debug) you will find and will have to rename the files before use
c:\EQEmu-0.7.0-934\build\worlddebug.exe
c:\EQEmu-0.7.0-934\build\zoneperl.exe
c:\EQEmu-0.7.0-934\build\eqlaunch.exe
c:\EQEmu-0.7.0-934\build\EMuShareMem.dll

I hope this helps....

kenjutsuka
12-08-2006, 10:43 AM
Awesome instructions so far, thanks. I got EQShareMem.Dll to compile just fine. Unfortunately I have about 2000 linker (LNK2001) errors with World, looking up what to do about that now. Something about an entry point (??3@YAXPAX@Z) or 12(Ask for a list of em' if you really want) Seems that none of the object files linked correctly, or flagged multiple LNK2001 errors. Also on zone it gave a LNK1181 on the mysqlclient.lib. I compiled the mysqlclient.lib from the dev source I got along with the zlib, and the other includes. I wasn't sure if this was what I was supposed to do, as the source I downloaded only had source files for the mysqlclient.lib, not a precompiled one(thus I kinda deviated from your instructions). Thanks. =)

kenjutsuka
12-08-2006, 02:01 PM
Update: I thought it might have to do with my compilation of the zlib.lib but it turned out even using a different precompiled one that came with one of the downloads, it still threw all of the same linking problems, for instance,
<Compiler Output>
Error 48 error LNK2001: unresolved external symbol "public: __thiscall std::exception::exception(char const * const &)" (??0exception@std@@QAE@ABQBD@Z) libcpmt.lib
Error 116 error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@) libcpmt.lib
Error 202 error LNK2001: unresolved external symbol "public: virtual char const * __thiscall std::exception::what(void)const " (?what@exception@std@@UBEPBDXZ) StructStrategy.obj
Error 301 error LNK2001: unresolved external symbol "public: virtual __thiscall std::exception::~exception(void)" (??1exception@std@@UAE@XZ) dbasync.obj
Error 335 error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) XMLParser.obj
Error 479 error LNK2019: unresolved external symbol _memmove_s referenced in function "public: struct _Ctypevec __thiscall std::_Locinfo::_Getctype(void)const " (?_Getctype@_Locinfo@std@@QBE?AU_Ctypevec@@XZ) libcpmt.lib
</Compiler Output>
(Just to give an idea of what's going on here. And it's all to do with the object files.)
I'm not sure if I'm missing an important library file or maybe one of the headers is wrong, but I doubled checked everything and it's according to what you posted, I'm running through google looking up what other people have had this problem, but nothing terribly similar other than people who were missing a library file or trying to compile a single threaded app using msvcrt, etc. Lemme know what you thinks up or gimme a hint if ya could.

Thanks,
Kenjutsuka

kenjutsuka
12-08-2006, 10:38 PM
Y'know that part about ignore specific libraries under linker settings? Is that important when your compiling? I just got world AND zone to compile without those in there, didn't flag at all. Does it effect the build at all anyway when executing those parts? Just curious, lemme know please. And is the inclusion of the eqlaunch necessary? I was able to compile that no prob with what was given (aside from the edits to the project file). I'm just curious mostly if since it compiled, is it going to work?

LostZaphod
12-11-2006, 02:56 AM
I use Visual Studio 2003 ver (1.1) and i have to have the ignor lib's certain lib files or i get many link errors. The compiler you are using must not include some libs during another part of the build. The Eqlaunch is important if you are using mysql5, if you are using mysql4 you could use the precompiled release. I just like to compile the entire project just in case i modify a table for my own porpose, and yes the eqlaunch does use the database.