Compiling eAthena with GCC in Cygwin
By Reaper-X on Apr 14, 2007 in Guide, Misc. Games, Software, Video Games, Windows
Since i got interested on playing Ragnarok online once again, so i decided to create this guide .. and this guide is useful to those who’s interested on running their private ragnarok online server from home .. but if it’s for me i use this to test build, finding rare items, etc without doing real work (read: if you play on private server you’ll need to get the items manually) because i can type any items i want as a GM (Game master). But instead of telling you on how to setup server (i’ll write more about this at later time). This post will tell you on how to build / compile eathena in Windows with GCC (GNU Compiler Collection) in Cygwin
And to those who didn’t know or never heard about eathena. eAthena is an open-source project, emulating a Ragnarok Online Server
Getting SVN Client
First of all, in order to fetch the latest eathena files from it’s Subversion repository you’ll need a SVN client program. And in Windows there are 2 ways of doing this (both of them are free) :
- TortoiseSVN : A free Windows SVN client which is implemented as a windows shell extension (in the other words, you can fetch svn files by right clicking)
- SVN client under Cygwin : You can also get SVN under Cygwin by choosing to download it from the development tools section when you’re installing Cygwin (detail below)
And it’s up to you to choose which one you think is best for you (but in this post im going to tell you on how to use the svn under cygwin). And if you decided to use Tortoise i assume you’ve already installed it, but to those who’s decided to use SVN from cygwin i'm sure you havent installed it yet
Installing Cygwin
Now as for the next step, grab Cygwin from here and download the setup.exe and save it somewhere on your harddrive (i suggest you to create new directory). And do the same steps like installing any other program until you reached this screen

Expand the development (devel) branch and see if GCC and Make already checked. If it is not checked by default then check it by yourself because it is needed, also if you decided to use the svn client from cygwin do not forget to checked it too
As for the other files, well .. you can decided whether you want to download the package or not (it’ll tell you if the package need dependancies from other package) … either way .. it’ll take a while before you finished downloading this into your computer so feel free to do anything you want while downloading the cygwin files
As an addition, you might try looking at the nearest mirror while downloading the cygwin package (if it’s for me although the nearest mirror located at kambing.vlsm.org, because it always give me problem like connection loss, etc .. i decided to use the cygwin.osuosl.org mirror)
When you’ve finished downloading run the cygwin shell from your desktop or start menu to create your user account directory, and then press CTRL+D (logout from cygwin shell)
Grab the MySQL Source
Yet another big download (at least for me), this time you must download MySQL Source to compile the library needed for eathena (sql version) and you can grab it from this page (choose the compressed gnu tar archive, and at the time i wrote this post the latest mysql version available is 5.0.37)
And when you’ve finished downloading the mysql source. Move or copy the tar archive into your cygwin home directory (for example if you installed cygwin in C:\Cygwin . Your user directory would be C:\Cygwin\home\Your_Windows_Username) which is created during the previous process which is involving the CTRL+D key
Grab the latest eathena SVN
1. If you’re using SVN under Cygwin :
Type this at the cygwin command prompt (shell) :
- mkdir eathenasvn
- cd eathenasvn
- svn co http://svn.eathena.ws/svn/ea/trunk . (can also be viewed using your browser. Oh .. and don’t forget the last dot) .. and the next time when you want to update it, you can just simply type :
- svn update
And the end results would be like this for an example :
C:\Cygwin\home\Your_Windows_Username\eathenasvn (where the versioned eathena files located)
2. If you’re using TortoiseSVN :
- create new directory (for example eathenasvn)
- go inside that directory
- right click and choose checkout
- insert this url or the above svn url at this screen (like below image) :

Compiling MySQL Client Library
From the cygwin command prompt type this :
- tar zxf mysql-5.0.37.tar.gz
- cd mysql-5.0.37
- ./configure —without-server
- make && make install
Now you have to wait until the compile process finished (it’ll take a while so feel free to browse around the net if you got bored)
As a side note, there are other configure flags you can set (try playing around the configure options) .. but the above configure flags already sufficient for most users
Exporting unversioned eathena files and compile it
1. If you’re using SVN under cygwin type this at the shell (note: the directory where versioned eathena located is in the previous step) :
- cd $home
- svn export eathenasvn eathenasvnbuild
- cd eathenasvnbuild
- make sql (if you want to use mysql) / make txt (if you want to use the flatfile database / txt version)
2. If you’re using TortoiseSVN, choose export by right clicking on the eathenasvn directory and choose the export path .. as for the rest it’s the same like above. With the exception you must go to where unversioned eathena located and type make sql / make txt
As an addition, if you want to use other C Flags you can edit the eathena makefile
That’s it you’ve finished compiling eathena by yourself .. as for the next / future post (that’s because i want to play World of Warcraft in Private server for the first time .. :P ), i would create a guide on how to setup your own ragnarok private server using eathena

Website RSS Feed
Stumble this post
Bookmark this post on Del.icio.us
Submit this post to Digg
Submit this post to Reddit
Print this
Trackback URL












can u help me creat and ro server plese email me at de_laides_lover@yahoo.com
can u please help me create a ro server
please please please
and please e-mail it to me at de_laides_lover@yahoo.com
Hi there.
Can you teach me how to recompile the server?
I made some changes in the src folder, but they do not work until I recompile it.
Please give me futher instructions.
Kind regards, Lai.
Actually you just need to type :)
$ make clean
$ make
Everything works up to 'make sql'. Then its saying "*** No rule to make target 'sql'". Any idea whats wrong?
Sorry for late reply i didn't saw your comment :(
btw i just take a look at the ea svn, and it seems that you need to run the configure script this time :)
so you need to run ./configure first
Yes!! It worked!! Thank you so much! =P
what is this suppose to be?
i dont understand
make[2]: *** [login-server_sql] Error 1
make[2]: Leaving directory `/cygdrive/c/Documents and Settings/Leo/eathenasvnbui
ld/src/login_sql'
make[1]: *** [login_sql] Error 2
make[1]: Leaving directory `/cygdrive/c/Documents and Settings/Leo/eathenasvnbui
ld'
make: *** [sql] Error 2
i can't "make sql" i've tried make clean, ./configure, but I dont think i did the mysql part correctly. i already installed mysql beforehand, it already works with the server, i've just been trying to compile.
I typed out
./configure and it configured and after sometime this is what appears...
"configure: error: zlib library not found or incompatible, please specify the correct path with --with-zlib=DIR.. stopping"
Mind helping me out?