Compiling Compiling error (visual studio 2015)

undead mage

Active Member
Joined
Mar 25, 2012
Messages
336
Reaction score
41
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

 

Simbaclaws

ˁ(⦿ᴥ⦿)ˀ
Joined
Mar 15, 2016
Messages
41
Reaction score
1
Location
Netherlands
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:
OP
undead mage

undead mage

Active Member
Joined
Mar 25, 2012
Messages
336
Reaction score
41
Location
Amsterdam
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
 

Simbaclaws

ˁ(⦿ᴥ⦿)ˀ
Joined
Mar 15, 2016
Messages
41
Reaction score
1
Location
Netherlands
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:
OP
undead mage

undead mage

Active Member
Joined
Mar 25, 2012
Messages
336
Reaction score
41
Location
Amsterdam

mpa

Member
Joined
Oct 8, 2008
Messages
319
Reaction score
13
Location
Sweden
run this command in cmd:
Code:
echo %TFSSDKDir% && echo %BOOST_ROOT%
and post the results
 

mpa

Member
Joined
Oct 8, 2008
Messages
319
Reaction score
13
Location
Sweden
Code:
C:\WINDOWS\system32
C:\WINDOWS\system32
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.
 
OP
undead mage

undead mage

Active Member
Joined
Mar 25, 2012
Messages
336
Reaction score
41
Location
Amsterdam
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
 

mpa

Member
Joined
Oct 8, 2008
Messages
319
Reaction score
13
Location
Sweden
Reboot and try again
Edit: Path might still be wrong, post results from
Code:
echo %TFSSDKDir% && echo %BOOST_ROOT%
again
 
Last edited:

mpa

Member
Joined
Oct 8, 2008
Messages
319
Reaction score
13
Location
Sweden
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
 
OP
undead mage

undead mage

Active Member
Joined
Mar 25, 2012
Messages
336
Reaction score
41
Location
Amsterdam
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.
 
OP
undead mage

undead mage

Active Member
Joined
Mar 25, 2012
Messages
336
Reaction score
41
Location
Amsterdam
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
 

mpa

Member
Joined
Oct 8, 2008
Messages
319
Reaction score
13
Location
Sweden
It should work now. Try to download new sources so you compile from a new project.
 
OP
undead mage

undead mage

Active Member
Joined
Mar 25, 2012
Messages
336
Reaction score
41
Location
Amsterdam
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:
Top