Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 01-11-2004, 05:43 AM
Tertiary
Hill Giant
 
Join Date: Nov 2003
Posts: 192
Default EQEmu DEV-C++ Howto (updated for 5.5DR1)

Here is a HOWTO to get EQEmu 5.3DR2 (01/01/2004 version) to compile
with Bloodshed Dev-C++ / mingw.

http://www.rama.demon.co.uk/EQEmu-Dev-C++.zip

Most of the changes were trivial. The two biggest headaches were:

1) Dev-C++ won't by default link against the mysql libraries

I have included instructions on how to create a libmysql.a

2) vsnprintf would SIGSEGV every time.

In the end I found a portable version of vsnprintf written in C
which I have included in the zip, and included in the HOWTO details
of where to put #ifdefs to use this version when compiling under Dev-C++.

I have also included .dev files for Emusharemem/world and zone (similar to VS .NET's .SLN fies).

I have only tested briefly under minilogin and it seems stable enough.

EDIT: The following added for 5.5DR1

The source tree for 5.5DR1 with Dev-C++ changes already made is available here:

www.rama.demon.co.uk/5.5DR1DevCPPSource.zip

I found out why vsnprintf wasn't working, so the 5.5DR1 zip no longer uses the 'portable vsnprintf', rather there are changes to allow the standard vsnprintf to work. As a result, any bugs (such as non-functioning #npcspawn add) relating to the use of the portable vsnprintf should be gone.
Reply With Quote
  #2  
Old 01-11-2004, 06:31 AM
mattmeck
Guest
 
Posts: n/a
Default

Great contribution!!!
Reply With Quote
  #3  
Old 01-11-2004, 09:05 AM
Shadow-Wolf
Dragon
 
Join Date: Oct 2003
Posts: 511
Default

this has just made my day maaaaan thank you!
Reply With Quote
  #4  
Old 01-11-2004, 09:08 AM
Tertiary
Hill Giant
 
Join Date: Nov 2003
Posts: 192
Default

Quote:
Originally Posted by Shadow-Wolf
this has just made my day maaaaan thank you!
Let me know if you get it to work
Reply With Quote
  #5  
Old 01-11-2004, 11:03 AM
Shadow-Wolf
Dragon
 
Join Date: Oct 2003
Posts: 511
Default

well sadly it didn't compile right =(
here are the errors i get:
86 C:\eqemu\5.3dr2dev\common\debug.h
In file included from ../common/debug.h
1 C:\eqemu\5.3dr2dev\EMuShareMem\Doors.cpp
from Doors.cpp
C:\eqemu\5.3dr2dev\common\Portable_vsnprintf.h
[Warning] In function `int portable_vsnprintf(char*,:
3 C:\eqemu\5.3dr2dev\common\Portable_vsnprintf.h
previous declaration of `int
225 C:\Dev-Cpp\include\stdio.h
conflicts with new declaration with C linkage
C:\eqemu\5.3dr2dev\EMuShareMem\Makefile.win
[Build Error] [Doors.o] Error 1
Reply With Quote
  #6  
Old 01-11-2004, 11:16 AM
Tertiary
Hill Giant
 
Join Date: Nov 2003
Posts: 192
Default

Thanks Shadow-Wolf. Give me a day or two and I will see if I can figure out what is wrong. BTW can you give me a link to the EQEmu source that you are using ?
Reply With Quote
  #7  
Old 01-11-2004, 01:53 PM
Shadow-Wolf
Dragon
 
Join Date: Oct 2003
Posts: 511
Default

well im using the source from shawns cvs
http://shawn319.eqemulator.net/cvs/ no changes made to it except for the ones you said to add
Reply With Quote
  #8  
Old 01-11-2004, 08:04 PM
Tertiary
Hill Giant
 
Join Date: Nov 2003
Posts: 192
Default

Don't add the

Code:
#ifdef __MINGW32__
#include "../common/Portable_vsnprintf.h"
#define vsnprintf portable_vsnprintf
#endif
to common/types.h (or remove it if you did). That was an error that slipped in while I was reworking the changes and compiling the howto.
Reply With Quote
  #9  
Old 01-11-2004, 11:33 PM
Lurker_005
Demi-God
 
Join Date: Jan 2002
Location: Tourist town USA
Posts: 1,671
Default

Very nice job! Should make quite a few people happy.
Dang! that makes an F#$%ing HUGE zone.exe!

First a note, I updated to mingw 3.3.1


In world\console.cpp
Code:
if defined(WIN32) && !defined(__MINGW32__)
is missing the # on the if

I had to add -D_GLIBCPP_USE_C99 -D_GLIBCPP_USE_C99_DYNAMIC to the dev files.

I got
Code:
Warning c:\SourceCode\EQEmu-0.5.3-DR1\world\Warning
.drectve `%.*s' unrecognized
when compiling world


For perl support:
c:\dev-cpp\bin\reimp -d c:\perl\lib\core\perl58.lib
c:\dev-cpp\bin\dlltool --input-def perl58.def --dllname perl58.dll --output-lib c:\dev-cpp\lib\perl58.a -k

and the beginning of zone_perl.dev
Code:
[Project]
FileName=Zone_perl.dev
Name=Zone_perl
Ver=1
IsCpp=1
Type=1
Compiler=-D__GNUWIN32__ -w -finline-functions -DCATCH_CRASH -D_WIN32_WINNT=0x0400 -DNDEBUG -DZONESERVER -DZONE -DINVERSEXY -DWIN32 -D_CONSOLE -D_MBCS -DFIELD_ITEMS -DEQDEBUG=0_@@_ -D_GLIBCPP_USE_C99 -D_GLIBCPP_USE_C99_DYNAMIC -DEMBPERL_PLUGIN -DEMBPERL_@@_
CppCompiler=-D__GNUWIN32__ -w -finline-functions -DCATCH_CRASH -D_WIN32_WINNT=0x0400 -DNDEBUG -DZONESERVER -DZONE -DINVERSEXY -DWIN32 -D_CONSOLE -D_MBCS -DFIELD_ITEMS -DEQDEBUG=0 -DSHAREMEM_@@_ -D_GLIBCPP_USE_C99 -D_GLIBCPP_USE_C99_DYNAMIC -DEMBPERL_PLUGIN -DEMBPERL_@@_
Includes=c:\mysql\include;c:\eqemu\zlib;c:\perl\lib\core
Linker=-lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lwsock32 -lzlib -lmysql_@@_ ../../../Dev-Cpp/lib/perl58.a_@@_
Libs=
UnitCount=121
Folders="Common Header Files","Common Source Files","Header Files","Source Files","Text Files"
ObjFiles=
PrivateResource=
ResourceIncludes=
MakeIncludes=
Icon=
ExeOutput=
ObjectOutput=
OverrideOutput=0
OverrideOutputName=Zone_perl.exe
I didn't do any testing besides compiling it.


FYI The changes didn't have an effect on compiling in MSVC++6
Not that they should have.
__________________
Please read the forum rules and look at reacent messages before posting.
Reply With Quote
  #10  
Old 01-12-2004, 01:22 AM
Trumpcard
Demi-God
 
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
Default

Any developers using bloodshed want to join the dev team ?
__________________
Quitters never win, and winners never quit, but those who never win and never quit are idiots.
Reply With Quote
  #11  
Old 01-12-2004, 02:26 AM
Muuss
Dragon
 
Join Date: May 2003
Posts: 539
Default

Well, nice job Tertiary, amazing !

I compiled without real trouble using your fixes, with dev-cpp 4.9.8.0. things i did :
--added Portable_vsnprintf.h/cpp to the project files
--changed -lzlib to -lzlib1 (i used the pre-compiled zlib1.dll from www.zlib.org)
--adapted the directories to my configuration

Thank you for porting eqemu to BloodShed, that's great of you, nice to have it compiling on a free w32 compiler !

ps : zone.exe weights 10
__________________
Muuss - [PEQGC] Dobl, the ogre that counts for 2 !
http://www.vilvert.fr/page.php?id=10
Reply With Quote
  #12  
Old 01-12-2004, 02:56 AM
Muuss
Dragon
 
Join Date: May 2003
Posts: 539
Default

Quote:
zone.exe weights 10 718 428 bytes.
for zone.dev,
project -> project options -> compiler [tab] -> linker -> generate debugging information = yes

reduced zone.exe to 2
__________________
Muuss - [PEQGC] Dobl, the ogre that counts for 2 !
http://www.vilvert.fr/page.php?id=10
Reply With Quote
  #13  
Old 01-12-2004, 02:26 PM
Shadow-Wolf
Dragon
 
Join Date: Oct 2003
Posts: 511
Default

ok, i got eqmemshare.dll compiled nothing bad so far but when i try to compile world.exe i get these errors:

console.cpp C:\eqemu\5.3dr2dev\world\console.cpp
In member function `void Console::ProcessCommand(const char*)':
682 C:\eqemu\5.3dr2dev\world\console.cpp
parse error before `(' token
686 C:\eqemu\5.3dr2dev\world\console.cpp
`Ver_name' undeclared (first use this function)

(Each undeclared identifier is reported only once for each
687 C:\eqemu\5.3dr2dev\world\console.cpp
`Ver_build' undeclared (first use this function)
687 C:\eqemu\5.3dr2dev\world\console.cpp
`ultoa' undeclared (first use this function)
688 C:\eqemu\5.3dr2dev\world\console.cpp
`Ver_min' undeclared (first use this function)
689 C:\eqemu\5.3dr2dev\world\console.cpp
`Ver_maj' undeclared (first use this function)
690 C:\eqemu\5.3dr2dev\world\console.cpp
`Ver_pid' undeclared (first use this function)
34 C:\eqemu\5.3dr2dev\world\console.cpp:691
#elif without #if
694 C:\eqemu\5.3dr2dev\world\console.cpp
`GetOS' undeclared (first use this function)
34 C:\eqemu\5.3dr2dev\world\console.cpp:695
#else without #if
34 C:\eqemu\5.3dr2dev\world\console.cpp:697
#endif without #if
749 C:\eqemu\5.3dr2dev\world\console.cpp
jump to case label
385 C:\eqemu\5.3dr2dev\world\console.cpp
crosses initialization of `Seperator sep'
C:\eqemu\5.3dr2dev\world\Makefile.win
[Build Error] [console.o] Error 1

zone.exe compiled fine except this error
\Dev-Cpp\Bin\..\lib\gcc-lib\mingw32\3.2\..\..\..\..\mingw32\bin\ld.exe C:\eqemu\5.3dr2dev\zone\C
cannot find -lzlib
Reply With Quote
  #14  
Old 01-12-2004, 04:16 PM
dingo01
Fire Beetle
 
Join Date: Jan 2004
Posts: 2
Default

For the first part of your problem, correct the typo that Lurker pointed out. In world\console.cpp, add a # to the front of
Code:
if defined(WIN32) && !defined(__MINGW32__)
For your second problem, the makefile is looking for zlib.dll in the C:\dev-cpp\lib folder, so make sure you have a copy of it over there and you should be alright.

I do have a problem of my own, though, that maybe someone could help with. Apparently I'm not installing or using reimp right. When I try to run World.exe or Boot5Zones, I get this error:

Quote:
The procedure entry point mysql_real_escape_string could not be located in the dynamic link library libmysql.dll.
Is there a certain directory I should be in when I run the reimp and dlltools commands? Do I have to add any files anywhere else? I ran both of those commands as listed just from whatever directory I happened to be in. I installed MinGW 3.1.0-1 in the dev-cpp\bin folder (and also have an install sitting in dev-cpp\bin\MinGW and also have all the contents of MinGW\bin sitting in the bin directory). When I run those two commands it pops up a new command prompt without an error, like the command went through. Any help would be greatly appreciated.

Oh, and great package, Tertiary!
Reply With Quote
  #15  
Old 01-12-2004, 05:29 PM
Shadow-Wolf
Dragon
 
Join Date: Oct 2003
Posts: 511
Default

yay got it working now you rock tertiary!(and dingo01
for his bit of help)
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 07:36 PM.


 

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