• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Compiling The Great Compiling Tutorial (Windows)

Triggah

TrigCore
Joined
Aug 1, 2007
Messages
436
Reaction score
2
This Tutorial is made word to word by me.

Well I figure this forum is not only used for The Forgotten Server so i decided to make a Compiling tutorial that ACTUALLY WORKS?
isnt that great?
but wait there is more...

In this tutorial you will learn how to retrieve latest svn and how to get all those sources on sourceforge by downloading it all at once.
amazing right?
but wait there is more...

You will also learn the main thing you need to know and that is how to use Dev C++ and getting the stuff needed for it.
but wait there is more... (how exciting)

I gurentee that this Tutorial will help you with Compiling and if it doesnt you will get your money back with no charge and you keep the programs (just kidding) I feel that this may be a little long so some entertainment wouldnt hurt.


Lets start off with the downloads you will need.
Download everything that i post here. IT IS ALL NEEDED.

This Program is used to convert your sources into a .exe file to run a server.


-DOWNLOADS- (please download everything and i repeat EVERYTHING)

Dev-C++ (place in your C Drive)
http://sourceforge.net/project/down...vcpp-4.9.9.2_setup.exe&use_mirror=superb-west

Tortoise SVN: http://tortoisesvn.net/downloads (you will need to restart)

SAVE ALL DEVPAKS IN DEV C++ FOLDER
Iconv Devpak: http://prdownloads.sourceforge.net/devpaks/libiconv-1.8_1-1spec.DevPak

libxml Devpak: http://prdownloads.sourceforge.net/devpaks/libxml2-2.6.22-1cm.DevPak

MySQL Devpak In case u need it in the future: http://prdownloads.sourceforge.net/devpaks/libmysql-4.1.13a-1sid.DevPak

GMP Devpak: http://pekayz.googlepages.com/GMP.DevPak

Next: make a folder in your Dev-C++ folder named "others"
The following should be extracted to the "others" folder:
Lua 5.1: http://pekayz.googlepages.com/lua-5.1.rar
Boost: http://pekayz.googlepages.com/boost_1_33_1.rar

-INSTALLING DEVPAKS-

Installing devpaks is like a baby learning to crawl. (not kidding)
You know how you install a game and you dont feel like reading all that shit so you just click next next next finish

This would be a good time to click next next finish :) makes life simple.

-SVN-

Now its time for you to learn how to use TortoiseSVN (aka SVN)
Svn is used to retrieve sources from sourceforge all at once into a folder you choose. After installing the program you will need to restart. After restarting right click on your desktop. ill reapeat myself incase you didnt get that. As simple as it sounds you need to RIGHT CLICK desktop. For those of you who donno what desktop is, its the background of your monitor. After right clicking your desktop you will see SVN checkout.. and TortoiseSVN

Ill simplify this and make this into numbered steps.

Step 1. Click SVN checkout...

Step 2. In URL Repository type: https://opentibia.svn.sourceforge.net/svnroot/opentibia/otserv/trunk/

Step 3. Browse in Checkout Directory go to your C drive create a folder there and open up that browse. (use that browse for Checkout Directory.

Step 4. Click OK

Now you retrieved the latest opentibia sources (usually the most stable sources out there in opentibia).



IT'S TIME TO DO WHAT YOU HAVE BEEN WAITING FOR!!
TIME TO COMPILE

I will use steps for this too because its easier to follow.

Step 1. Open the Dev-C++ program

Step 2. goto File -> New project and select Console Application. Name it whatever you want and make sure it is C++ Project.

Step 3. Now on the left of the Program it will show a little icon with the name of your project. REMOVE Main.cpp

Step 4. Right click the icon with your project name and choose Add to Project. Then browse the folder with the sources that you got from SVN Checkout... and select them all and press open.

Step 5. goto Project -> project options or just use (ALT p) and click on the "Paremeters" tab.

Step 6. In the C++ compiler box you must add:
Code:
-D__EXCEPTION_TRACER__

Step 7. In the Linker box add:
Code:
-llibxml2
-llua
-llualib
-lwsock32
-lregex
-lgmp
-s
-Wl,-Map=otserv.map

Step 8. Now go to Directories tab and in the Library Directory subtab and add the following 1 by 1:
  • C:\Dev-Cpp\others\boost_1_33_1\libregex
  • C:\Dev-Cpp\others\lua-5.1\lib
Now click Delete Invalid (it will delete if your folders do not contain them.

Step 9. goto Include Directory Subtab (still in the Directories tab) and add the following 1 by 1:
  • C:\Dev-Cpp\others\boost_1_33_1
  • C:\Dev-Cpp\others\lua-5.1\include
Click Delete Invalid

If nothing was deleted after both Delete Invalids then you are fine.



We are going to be working on XML because i personally think its easier for beginners.

you will need to remove the SQL sources so do as follows.
Remove files:
· database.cpp
· database.h
· databasesqlite.cpp
· databasesqlite.h
· databasemysql.cpp
· databasemysql.h
· ioaccountsql.cpp
· ioaccountsql.h
· ioplayersql.cpp
· ioplayersql.h
· iomapserializesql.cpp
· iomapserializesql.h

Now save project if you want and
now the moment you have been waiting for.........!

click COMPILE!

Congratulations you finished reading this tutorial!


Thank you :)

Credits to people who put up their files/libraries etc..
all i did was take the right stuff from places i know are right and put it into 1 tutorial.
 
Last edited:
I bet most of the things written there you have no idea what's that actually. I find it hard to see your tutorial not being based on some other, made by someone else. Anyway, it looks kinda chaotic, you should use some bold words, change color font, size etc.
 
@legendfish

This thread is so nice many people use it but dont post anything only if the ahave errors or somting this is one of the best Tut i'v seen on otland that's why i'm rewarding you with 1 of my hard earned Rep+, you worked so hard to make this tut you have earned it and even more people should give i rep!
 
I like this. I think that this tutorial is better then that other one since you also explain how to download the sources and install the packeges.
 
It's an Ok tutorial, but you need to also include SQL not just XML and clean up the thread a little bit, throw in some bold fonts.
 
@ Ferrus: I actually learned more than you can imagine since we last talked on msn. lol

@Nightmare there is already a tutorial for TFS why would i make another one when that one is perfectly fine? ;p

@Mokerhamer thx its nice to see someone appreciate it :)

@master-m thx to you too :)

and @avarian thx for the suggestion i edited it
 
did anyone actually try this or most people from 0tfans and know it already?
 
hot tutorial it explained exaktly hwo do do evrything, but what happens when you compile?
 
Dev-C++ *shakes head*

Bro, you should do one for Code::Blocks or Eclipse, otherwise, why bother? This has been done to death. Boost 1.45 is out. It's not hard to compile it yourself either.
 
could you show me by teamviewer?

The compiler turns source code into machine code objects. At the end the linker concatenates these in a specific fashion outputting a binary executable.
 
buy i followed the guide and i get errors from the boost so its maybe out dated :S
 
Back
Top