• 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.6 compiling error

Mjmackan

Mapper ~ Writer
Joined
Jul 18, 2009
Messages
1,443
Solutions
15
Reaction score
179
Location
Sweden

Attachments

Everything went smooth but when Im trying to compile i am getting several errors as shown in picture. I have been searching around now for a day and wont seem to get any further so any help would be appreciated.
1.6 does not auto-install required libraries in Visual Studio (in required versions, it installs 'newest' from vcpkg, not version required by TFS), because it misses these lines from 1.7 (maybe some more, I'm not sure):
After you add these lines and re-run VS, it will use vcpkg.json file to detect required vcpkg libraries versions and install them before compilation.
 
seems like you didnt install boost
Boost is installed.
1.6 does not auto-install required libraries in Visual Studio (in required versions, it installs 'newest' from vcpkg, not version required by TFS), because it misses these lines from 1.7 (maybe some more, I'm not sure):
After you add these lines and re-run VS, it will use vcpkg.json file to detect required vcpkg libraries versions and install them before compilation.
Tried it, didn't change anything unfortunately.
 
can you check inside your vcpkg for that boost/beast/core error.hp and make sure it exists? if not you will need to install that library.
.\vcpkg install boost-beast (windows- run in terminal inside your vcpkg folder) then you will need to redirect your "vc17" or build folder to the new vcpkg using the toolchain command.
 
can you check inside your vcpkg for that boost/beast/core error.hp and make sure it exists? if not you will need to install that library.
.\vcpkg install boost-beast (windows- run in terminal inside your vcpkg folder) then you will need to redirect your "vc17" or build folder to the new vcpkg using the toolchain command.
Its something there, not sure what to look for really or in which folders.

1751573778161.webp


As in just vcpkg folder there isnt much:
1751574224049.webp
 

Attachments

Last edited:
Its something there, not sure what to look for really or in which folders.

View attachment 93453


As in just vcpkg folder there isnt much:
View attachment 93455
i wish i could help you more but honestly these compiling things can turn into a nightmare to solve. even my personal project took atleast 10 hours of my time to compile properly, after updating all libraries and having to edit source files to use newer version of boost and fixing the linking with cmakelists etc. its a lot of trouble. fortunately for you, you only have 12 errors there so I think you could do it, but it will be hard to find a specific answer here that fixes your problem, sometimes when you fix one, another will arise. but like gesior said, this one comes with a vcpkg.json which should fix your libraries for you. although it is telling you there is no file or directory for that error.cpp, so it either doesn't exist or your linking isn't finding the library.
 
i wish i could help you more but honestly these compiling things can turn into a nightmare to solve. even my personal project took atleast 10 hours of my time to compile properly, after updating all libraries and having to edit source files to use newer version of boost and fixing the linking with cmakelists etc. its a lot of trouble. fortunately for you, you only have 12 errors there so I think you could do it, but it will be hard to find a specific answer here that fixes your problem, sometimes when you fix one, another will arise. but like gesior said, this one comes with a vcpkg.json which should fix your libraries for you. although it is telling you there is no file or directory for that error.cpp, so it either doesn't exist or your linking isn't finding the library.
Hehe yeah I had more errors before, took me a while to correct but now it seems like im stuck.
Don't get why we don't just include correct vcpkg package, this is annoying.

Edit: Maybe I have been adding the directory at the wrong place?
I added them here at configuration properties -> vcpkg -> installed directory
1751643194401.webp
 

Attachments

Last edited:
Hehe yeah I had more errors before, took me a while to correct but now it seems like im stuck.
Don't get why we don't just include correct vcpkg package, this is annoying.

Edit: Maybe I have been adding the directory at the wrong place?
I added them here at configuration properties -> vcpkg -> installed directory
View attachment 93463
Its very annoying. I have used the “correct” vcpkg as other people that compiled it easily, and it still didn’t work for me. Usually when i link it i use a command like this ‘
DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release’. This is just an example don’t use it. But it basically builds all your .sln and other files using that path you specify. But sometimes it is necessary to edit those properties in the tfs project like you are doing
 
You should run ./vcpkg integrate install in vcpkg directory and it should be enough to make VS detect where is vcpkg.
You should use TFS master branch, not 1.6: GitHub - otland/forgottenserver: A free and open-source MMORPG server emulator written in C++ (https://github.com/otland/forgottenserver)
Right now only Release x64 build works in Visual Studio, but that's default.
I've done exactly that, thinking if it may be some cache memory issue I will try restart the PC more between installations.
Just to clarify my folders is setup as:
C:/vcpkg
C:/forgottenserver-1.6/vcpkg.json
I have tried installing vcpkg directly into C:/forgottenserver-1.6/ aswell with same errors however.

Isn't the master branch a continuation of 1.6, meaning: unstable version 1.7 or am i wrong?
 
Isn't the master branch a continuation of 1.6, meaning: unstable version 1.7 or am i wrong?
IDK, hard to tell, 1.7 (master) is not compatible with acc. makers, so you cannot login using login.php, only using build-in HTTP server in TFS.

I tried to compile 1.6 with clean vcpkg install, enabled 'vcpkg manifest' in VS and it does not work, but I found how to fix 1.6 build in Visual Studio.
Downloaded vcpkg from github, executed ./bootstrap-vcpkg.sh and ./vcpkg integrate install.
Downloaded TFS 1.6 sources from github, opened project in VS, changed build type to Release and enabled vcpkg manifest as on screen:
1751730089370.webp

To make it compile, I had to enable http in vcpkg.json by replacing:
JSON:
  "default-features": [
    "lua"
  ],
with:
JSON:
  "default-features": [
    "lua", "http"
  ],
this made vcpkg install boost-beast and boost-json.
You may also need to remove vcpkg_installed folder from TFS folder, to make VS notice, that vcpkg.json config is changed.
 
IDK, hard to tell, 1.7 (master) is not compatible with acc. makers, so you cannot login using login.php, only using build-in HTTP server in TFS.

I tried to compile 1.6 with clean vcpkg install, enabled 'vcpkg manifest' in VS and it does not work, but I found how to fix 1.6 build in Visual Studio.
Downloaded vcpkg from github, executed ./bootstrap-vcpkg.sh and ./vcpkg integrate install.
Downloaded TFS 1.6 sources from github, opened project in VS, changed build type to Release and enabled vcpkg manifest as on screen:
View attachment 93502

To make it compile, I had to enable http in vcpkg.json by replacing:
JSON:
  "default-features": [
    "lua"
  ],
with:
JSON:
  "default-features": [
    "lua", "http"
  ],
this made vcpkg install boost-beast and boost-json.
You may also need to remove vcpkg_installed folder from TFS folder, to make VS notice, that vcpkg.json config is changed.
That change in vcpkg.json did some major progress, i replaced this:
JSON:
  "default-features": [
    "lua",
    "http",
    "libmariadb"
  ],
With this:
JSON:
  "default-features": [
    "lua", "http"
  ],

However it ofcourse resulted in this error:
Cannot open include file: 'mysql/mysql.h': No such file or directory theforgottenserver C:\forgottenserver-1.6\src\otpch.h 36

So i tried:
JSON:
  "default-features": [
    "lua", "http", "libmariadb"
  ],
But with that change all errors came back.
 
That change in vcpkg.json did some major progress, i replaced this:
It looks like 1.7 vcpkg.json. Get clean 1.6 file:
and replace:
JSON:
  "default-features": [
    "lua"
  ],
with:
JSON:
  "default-features": [
    "lua", "http"
  ],
Then remove vcpkg_installed from main TFS folder and all folders from vc17 TFS subfolder, to make sure that VS will install all libraries again and do clean build.
 
It looks like 1.7 vcpkg.json. Get clean 1.6 file:
and replace:
JSON:
  "default-features": [
    "lua"
  ],
with:
JSON:
  "default-features": [
    "lua", "http"
  ],
Then remove vcpkg_installed from main TFS folder and all folders from vc17 TFS subfolder, to make sure that VS will install all libraries again and do clean build.
Followed all those steps, downloaded the new vcpkg.json, added ,"http" and removed vc17 subfolders and vcpkg_installed.
That sent me back to start unfortunately.
1751732454206.webp
Post automatically merged:

I asked chatgpt and came to this solution and it solved the issue, but not sure this is a good way to solve this.
1751733655451.webp
 
Last edited:
Back
Top