• 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 TFS 1.0/1.1 latest source. 64 and 32 bits. Pics and lots of explanation.

dominique120

Science & Reason
Senator
Premium User
Joined
Jun 16, 2013
Messages
3,881
Solutions
3
Reaction score
1,043
Location
Númenor
Welcome to my TFS 1.0/1.1 compiling tutorial. I'm making this one because the other one is a bit messy and people where having errors and the on on Github is a bit advanced. Well enough with the stories lets get to work!

1. First lets get our includes, libs and our compiler.
2. Now that we have everything lets get started setting up our files.

2.1 Install Boost in an easy to remember place:
HveKXo2.png


2.2 Same with the SDK
r73Pbj6.png


2.3 And lets drop that source in the OT folder I'm sure we all have, or just put it in D:
r9SOCw2.png

3. Now lets open up our solution.
dghyn2P.png


4. Time to set up our config. Open up the properties dialog box by right clicking on the project
zI4zWgo.png


5. Set up the configuration. This tutorial is for x64 only, an x32 tut is coming soon, but seriously, who still uses x32?
vuhlXXm.png


6. Now lets set up our includes.
6.1:
kQUmbb4.png


6.2: Make sure your directories are appropriate, if you extracted the files somewhere else make sure you point to those directories instead of these ones.
ZojfDqP.png


7. Time for the libs, similar to the includes:
7.1:
LxNcuhX.png


7.2: Same as the includes, make sure you get the right dirs.
UjJA9Js.png


7.3: Hit apply to save your changes.

8. Now let it parse all the files
Nr7f9MJ.png


EdWjnOL.png


9. After Parsing is done it will be
mbJWC7w.png


10. Hit that rebuild button and let it compile away!
V82oTHc.png


Once it is finished you should get something like this:
qTK8VWP.png


And the log should look like this
And there you have it! You just compiled The Forgotten Server 1.0 x64 developed by @Mark Samman.

Enjoy!
 
Last edited by a moderator:
Since a few people are still using a 32 bit version of Windows, here is a tutorial for compiling on x32:

The steps are similar to the tutorial for x64 so just replace the steps above with this ones and it should work.

1. Getting the right files. Same as above but this time we use 32 bit boost files.

2. Install Boost 32 bit to an easy to remember location.
aVpjUCE.png


5. Like mentioned above, extract the SDK and the source. Now open up the solution, go to properties and configuration manager. And change it like this:
gjy3Ai5.png


6. Same as before make sure the dirs are appropriate.
O16wJwj.png

7. Make sure you select the lib folders, not the lib64 folders.
5jZIsdo.png


Now rebuild and watch it rebuild.

Enjoy!
 
Last edited:
FAQ:

Q: How do I use the batch files that come with the TFS SDK?
A: Put the "register_boost_env.bat" in the boost directory and execute it, and leave the "register_tfssdk_env.bat" where it was and execute it. Then you can skip the steps where we add directories.

Q: Why link manually?
A: I believe it is better because it removes one more thing that could go wrong. Also, if you dont have admin rights the execution of those files will fail.

Q: I get "Unable to start application 0xc0000007b"
A: You are not using the right arch with the DLLs that you downloaded. If you compiled a x64 TFS you must use x64 DLLs.

Q: I get "missing something/something.h" errors.
A: You probably did not let it parse completely or you did not link properly.

Q: My TFS crashes and says it cant connect to the database.
A: You probably did not configure the database properly or you are using 'localhost', switch to 127.0.0.1

Q: Did not find PDB file
A: You are probably compiling in debug mode, you can ignore this warning.

Q: Can I compile with GUI?
A: TFS 1.0 does not have support for GUI as it is useless.

Q: Can I compile with war system?
A: It compiles by default

Q: And cast?
A: A system is not implemented yet.

Q: Can I use another program?
A: No you can only use MSVC 2013

Q: Why did I make this tutorial?
A: I made it because the other one is very messy and hard to follow, and the one in github is a bit advanced.
 
Last edited:
Is there any reason you're linking include/libraries manually instead of setting SDK/Boost path with the .bat files that comes with TFS-SDK?
 
Is there any reason you're linking include/libraries manually instead of setting SDK/Boost path with the .bat files that comes with TFS-SDK?

1. I am absolutely positive some people will get it wrong
2. I still get missing includes and libs if I dont add them manually.
I like to force dirs because it removes one more thing that can go wrong.

Good Tutorial but brother as ninja said why are you linking lib manually
also there is another tutorial xD and it's good
http://otland.net/threads/compiling-tfs-simple-tutorial-for-beginners.197474/
UpInSmoke

That one is not for TFS 1.0. And yes that is a fantastic tutorial, that is how I learned to compile TFS with MSVC.
 
i'm curious, how do i find this "parse" thingy?

Edit:
Error 1 error C1083: Cannot open include file: 'boost/tokenizer.hpp': No such file or directory c:\users\forc3\desktop\compiling\forgottenserver-master\src\otpch.h 30 1 theforgottenserver


This is what i get nontheless.. any idea? :)
 
Last edited:
i'm curious, how do i find this "parse" thingy?

Edit:
Error 1 error C1083: Cannot open include file: 'boost/tokenizer.hpp': No such file or directory c:\users\forc3\desktop\compiling\forgottenserver-master\src\otpch.h 30 1 theforgottenserver


This is what i get nontheless.. any idea? :)

It parses automatically, let it run for a couple minutes(takes maybe 2 mins on my PC). That error is probably because it did not parse fully or you did not add the directories accordingly.
 
Last edited:
Rly great tutorial, keep doing tutorials =)

Yeah I want to make one for OTC that is why I was asking about compiling it. I've also got a hold on Stians Dev-Cpp x64 repack but I still cant get it to compile in x64, I would very much like to make a tutorial for compiling 0.4 and 0.3.x in x64
 
An Otclient tutorial would be great !! Ask me if you have any doubt.
 
I think that's not quite true what you say. If there War System code.
Code player.cpp
Code:
        if (isInWar(player)) {
            return SKULL_GREEN;
        }

        if (!player->getGuildWarList().empty() && guild == player->getGuild())
 
Back
Top