• 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 Compiling error (visual studio 2015)

undead mage

Active Member
Joined
Mar 25, 2012
Messages
364
Solutions
2
Reaction score
47
Location
Amsterdam
So im getting a pugixml error when im trying to compile can somebody please help me out? I made a video of how im compiling and did put it on youtube. It's 03:53 minutes long but it starts at 01:00 xd so it's 02:53 minutes :p

 
On the github page in the vc14 folder it says: Remove pugixml from the repository. This could have something to do with your error.
It concerns the following commit: https://github.com/otland/forgottenserver/commit/017b6f4fa65ffa6c1d8b82b5fee17163e75a681e
Perhaps pugixml should be installed first as a dependency on your system?
I would suggest downloading pugixml from http://pugixml.org/ "click on the Windows link on the right in Windows/Unix."
Copy the pugixml.hpp from the zip archive in the src folder to your master repository maybe that works. I'm not sure in which folder it should be located so you'll have to figure that out on your own. My hunch is the src folder inside the master repository where you are compiling from.
You have the file, you just have to find out where to put it...
 
Last edited:
On the github page in the vc14 folder it says: Remove pugixml from the repository. This could have something to do with your error.
It concerns the following commit: https://github.com/otland/forgottenserver/commit/017b6f4fa65ffa6c1d8b82b5fee17163e75a681e
Perhaps pugixml should be installed first as a dependency on your system?
I would suggest downloading pugixml from http://pugixml.org/ "click on the Windows link on the right in Windows/Unix."
Copy the pugixml.hpp from the zip archive in the src folder to your master repository maybe that works. I'm not sure in which folder it should be located so you'll have to figure that out on your own. My hunch is the src folder inside the master repository where you are compiling from.
You have the file, you just have to find out where to put it...

Ty but im now getting the error
Code:
 Cannot open include file: 'boost/asio.hpp': No such file or directory
 
Ok to make my answer a bit easier:
here is what you need to do.
Check out the documentation for installing plugixml here: http://pugixml.org/docs/quickstart.html#install
The following lines are essential to making this work:
The complete pugixml source consists of three files - one source file, pugixml.cpp, and two header files, pugixml.hpp and pugiconfig.hpp. pugixml.hpp is the primary header which you need to include in order to use pugixml classes/functions. The rest of this guide assumes that pugixml.hpp is either in the current directory or in one of include directories of your projects, so that #include "pugixml.hpp" can find the header;

So, there you have it... include pugixml.hpp into your project when compiling.

EDIT: I didn't yet see your new post while I was writing this, I'll try helping you out hold on. Let me see what I can find. But first try what I suggested in this post instead of putting it in the src directory which I said in my previous post.

EDIT2: could you please show me which file points to the error? it should say so on the right of the error list.

EDIT3: ah boost is another dependency you need on your system in order to compile. I'll search for installation instructions on windows. These things are way easier on unix file systems :/

EDIT4: try installing boost on windows, here is a blog post showing you how it can be done: http://andres.jaimes.net/718/how-to-install-the-c-boost-libraries-on-windows/
you won't have to do the last check with the c++ file. You can simply run the compilation again after you've installed it.
Since that blog post is using minGW to compile you could also checkout this stackoverflow post: http://stackoverflow.com/questions/15766386/how-to-install-boost-on-windows-7-with-vs

It's a little advanced to get this to work but just read a lot and use common sense.
After you are done installing boost you might want to try and find the .hpp file and include it in your project aswell. I would also suggest you build the pugixml library.

Check out this link for building the pugixml libraries: http://pugixml.googlecode.com/svn/trunk/docs/manual/install.html#manual.install.building.static

It's not a good practice to only include the header files without having the actual libraries installed. You will get problems with your server then even if it compiles correctly... (for example some function calls won't work because you simply don't have the library's that contain the functions when executing the compiled source)

Note: don't forget to add the compiled libraries to your path environment variable.

Here is an example of how easy it would have been in a debian linux distro like ubuntu:
sudo apt-get install libboost-all-dev libpugixml-dev
 
Last edited:
Sorry for the double post but I saw this in another thread:
The wiki for forgottenserver has a entire instruction manual for compiling under windows and it has links to for example the boost libraries and what I think also contains the pugixml libraries (in the sdk?)

Make sure you follow these instructions:
https://github.com/otland/forgottenserver/wiki/Compiling-on-Windows
 
There's your problem. The path didn't get set correctly from the .bat files.
You can change them manually in Control Panel > System and Security > Advanced system settings(left sidebar) > Environment Variables, look for TFSSDKDir and BOOST_ROOT.

Thx! This time it worked but at the end I got 2 errors :p
Code:
Severity    Code    Description    Project    File    Line    Suppression State
Error    MSB6006    "link.exe" exited with code 1104.    theforgottenserver    C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets    637
and
Code:
Severity    Code    Description    Project    File    Line    Suppression State
Error    LNK1104    cannot open file 'libboost_system-vc140-mt-1_60.lib'    theforgottenserver    C:\Users\Oualid\Desktop\Project\10.91\forgottenserver-master (2)\forgottenserver-master\vc14\LINK    1
 
Reboot and try again
Edit: Path might still be wrong, post results from
Code:
echo %TFSSDKDir% && echo %BOOST_ROOT%
again
 
Last edited:
This is what mine looks like btw, but I put both the folders in C:\
Code:
C:\tfs-sdk-3.2
C:\boost_1_60_0

%TFSSDKDir% = "tfs-sdk-3.2" folder
%BOOST_ROOT% = "boost_1_60_0" folder
 
Reboot and try again
Edit: Path might still be wrong, post results from
Code:
echo %TFSSDKDir% && echo %BOOST_ROOT%
again

I will when I get home but I don't think that the path is wrong because it did load alot this time before I did set the path it was just failing immidiatly.
 
This is what mine looks like btw, but I put both the folders in C:\
Code:
C:\tfs-sdk-3.2
C:\boost_1_60_0

%TFSSDKDir% = "tfs-sdk-3.2" folder
%BOOST_ROOT% = "boost_1_60_0" folder

Well im home now and this is what I got

Code:
C:\Users\Oualid\Desktop\Project\10.91\tfs-sdk-3.2 (2)\tfs-sdk-3.2
C:\Users\Oualid\Desktop\Project\10.91\boost_1_60_0 (2)\boost_1_60_0
 
It should work now. Try to download new sources so you compile from a new project.
I already tryd that but when I do that it still gives me the error but only this error:
Code:
Severity Code Description Project File Line Suppression State
Error LNK1104 cannot open file 'libboost_system-vc140-mt-1_60.lib' theforgottenserver C:\Users\Oualid\Desktop\Project\10.91\forgottenserver-master (2)\forgottenserver-master\vc14\LINK 1
 
Last edited:
Back
Top