• Sign up for TFS Icon Competition! The prize includes Otland Premium time and a medal, as well as obviously taking part in TFS history.
  • 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 [OTX 2.0] [VS] Error when compiling

potinho

Member
Joined
Oct 11, 2009
Messages
265
Solutions
7
Reaction score
22
Location
Brazil
Hello guys, its my first time compiling a OTX, need changes somethings in my sources. But when i trying to compile (downloaded Boost and tfssdk), gotting this error, using Visual Studio 2017:


Error LNK1104 cannot open file 'libboost_regex-vc120-mt-gd-1_64.lib' TheOTXServer C:\Users\p0t1nho\Desktop\OT\sources\msvc\LINK 1

Follow some prints of my project:

1618270390028.png

1618270100809.png
 
OP
potinho

potinho

Member
Joined
Oct 11, 2009
Messages
265
Solutions
7
Reaction score
22
Location
Brazil
You need boost_1_71_0 and Visual Studio 2015 instead of 2017, Follow this.
I follow steps:

executed "register_tfssdk_env.bat" on C:\tfs-sdk folder

executed "register_boost_env.bat" on C:\local\boost_1_71_0 folder

and got this error on Visual Studio:


Error C1083 Cannot open include file: 'boost/config.hpp': No such file or directory TheOTXServer c:\users\p0t1nho\desktop\ot\sources\otpch.h 34

So i go to VC++ Directories and add manually boost folder:

1618274720529.png

and got too many erros, using Visual Studio 2015, following steps in this link

1618275514233.png
 
Last edited:

M0ustafa

1337
Senator
Joined
Mar 4, 2017
Messages
2,456
Solutions
306
Reaction score
1,038
Location
Egypt
Manually add libraries/includes to Visual Studio and show me how you added them, Libs64 if you are compiling for 64, otherwise choose libs only.
 

M0ustafa

1337
Senator
Joined
Mar 4, 2017
Messages
2,456
Solutions
306
Reaction score
1,038
Location
Egypt
Click on Solution then Properties and choose C/C++ then Additional Include Directories and add your include folder there.
Then Linker and choose Additional library directories and add boost_1_71_0 folder there and lib folder there too.
Then compile and it should work as long as you have the correct libraries/includes and boost.
 
OP
potinho

potinho

Member
Joined
Oct 11, 2009
Messages
265
Solutions
7
Reaction score
22
Location
Brazil
Click on Solution then Properties and choose C/C++ then Additional Include Directories and add your include folder there.
Then Linker and choose Additional library directories and add boost_1_71_0 folder there and lib folder there too.
Then compile and it should work as long as you have the correct libraries/includes and boost.
Like in prints bellow? (if yes, still gotting error)

C/C++ Additional Include directiories (put tfs-sdk folder)
1618277316225.png

Linker>Additional Library Directiories (put boost root folderand boost/libs)

1618277426936.png


Is that correct?
Post automatically merged:

Trying new things and now got this different error:

1>------ Build started: Project: TheOTXServer, Configuration: Release Win32 ------
1>otserv.cpp
1>..\otserv.cpp(156): error C3680: cannot concatenate user-defined string literals with mismatched literal suffix identifiers
1>..\otserv.cpp(156): note: Concatenating suffix 'SOFTWARE_DEVELOPERS' with suffix 'FORUMS'
1>..\otserv.cpp(156): error C3688: invalid literal suffix 'SOFTWARE_DEVELOPERS'; literal operator or literal operator template 'operator ""SOFTWARE_DEVELOPERS' not found
1>..\otserv.cpp(426): error C3688: invalid literal suffix 'SOFTWARE_DEVELOPERS'; literal operator or literal operator template 'operator ""SOFTWARE_DEVELOPERS' not found
1>..\otserv.cpp(428): error C3688: invalid literal suffix 'FORUMS'; literal operator or literal operator template 'operator ""FORUMS' not found
1>Done building project "TheOTXServer.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 
Last edited:

ralke

(҂ ͠❛ ෴ ͡❛)ᕤ
Joined
Dec 17, 2011
Messages
695
Solutions
16
Reaction score
246
Location
Santiago - Chile
@potinho Your first error was libboost_regex-vc120-mt-gd-1_64.lib, that is a 64x lib. Now you're trying to do a Win32 release
potinho said:
1>------ Build started: Project: TheOTXServer, Configuration: Release Win32 ------
If you're going to use 64x libs, compile for 64 bits.

64bit.png

For the compiler set-up, first be sure you're using the correct Platform Toolset for the server you want to compile. My case, is v140 for OTX 3.8, and v142 for OTClient. Here is a usefull link for toolset information (you need to install manually) Visual Studio Build Tools now include the VS2017 and VS2015 MSVC Toolsets | C++ Team Blog (https://devblogs.microsoft.com/cppblog/visual-studio-build-tools-now-include-the-vs2017-and-vs2015-msvc-toolsets/) it is also important that the toolset is probably going to define which version of Visual Studio you're going to need.

toolset.png

When you get that ready, and get all the libs installed (boost/sdks), the C++/linker set-up should look like this (be sure you get all the files in the correct directories):

C++ LIBRARY
c++.png

LINKER LIBRARY
linker.png

About the error you have on compiling
potinho said:
Trying new things and now got this different error:

1>------ Build started: Project: TheOTXServer, Configuration: Release Win32 ------
1>otserv.cpp
1>..\otserv.cpp(156): error C3680: cannot concatenate user-defined string literals with mismatched literal suffix identifiers
1>..\otserv.cpp(156): note: Concatenating suffix 'SOFTWARE_DEVELOPERS' with suffix 'FORUMS'
1>..\otserv.cpp(156): error C3688: invalid literal suffix 'SOFTWARE_DEVELOPERS'; literal operator or literal operator template 'operator ""SOFTWARE_DEVELOPERS' not found
1>..\otserv.cpp(426): error C3688: invalid literal suffix 'SOFTWARE_DEVELOPERS'; literal operator or literal operator template 'operator ""SOFTWARE_DEVELOPERS' not found
1>..\otserv.cpp(428): error C3688: invalid literal suffix 'FORUMS'; literal operator or literal operator template 'operator ""FORUMS' not found
1>Done building project "TheOTXServer.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Go to mattyx otx 2 repository, and open sources folder. The go to otserv.cpp, press CTRL + F on you browser and search:
search.png

Get sure the line is added correctly on your sources, do the same for FORUMS suffix problem.
After that, go to definitions.h (where is the proyect names/developer names/etc.)
And check if you configurated correctly this part:

C++:
#define SOFTWARE_DEVELOPERS "Matt Gomez, Matheus Matias and The Forgotten Server Developers"

Hope this can fix all your errors.
Regards!
 
Last edited:
OP
potinho

potinho

Member
Joined
Oct 11, 2009
Messages
265
Solutions
7
Reaction score
22
Location
Brazil
@potinho Your first error was libboost_regex-vc120-mt-gd-1_64.lib, that is a 64x lib. Now you're trying to do a Win32 release

If you're going to use 64x libs, compile for 64 bits
.

View attachment 57644

For the compiler set-up, first be sure you're using the correct Platform Toolset for the server you want to compile. My case, is v140 for OTX 3.8, and v142 for OTClient. Here is a usefull link for toolset information (you need to install manually) Visual Studio Build Tools now include the VS2017 and VS2015 MSVC Toolsets | C++ Team Blog (https://devblogs.microsoft.com/cppblog/visual-studio-build-tools-now-include-the-vs2017-and-vs2015-msvc-toolsets/) it is also important that the toolset is probably going to define which version of Visual Studio you're going to need.

View attachment 57645

When you get that ready, and get all the libs installed (boost/sdks), the C++/linker set-up should look like this (be sure you get all the files in the correct directories):

C++ LIBRARY
View attachment 57647

LINKER LIBRARY
View attachment 57649

About the error you have on compiling


Go to mattyx otx 2 repository, and open sources folder. The go to otserv.cpp, press CTRL + F on you browser and search:
View attachment 57650

Get sure the line is added correctly on your sources, do the same for FORUMS suffix problem.
After that, go to definitions.h (where is the proyect names/developer names/etc.)
And check if you configurated correctly this part:

C++:
#define SOFTWARE_DEVELOPERS "Matt Gomez, Matheus Matias and The Forgotten Server Developers"

Hope this can fix all your errors.
Regards!
Thank you for your attention and detailed explanation. Done as you said but still gotting error "cannot open file 'libboost_regex-vc120-mt-1_64.lib".

Selected x32

1618316199387.png

Using Visual Studio 2013 like my Plataform Toolset shows:
1618313746707.png

Linker Additional Libraries
1618313856356.png

C++ Directories

1618313927517.png


Trying to compile this work:


The OTX Server Version: (2.100 - 6000) - Codename: (FINAL)
Compilied with Microsoft Visual C++ version 12.0 for arch 32 Bits at Jul 15 2014 23:05:29
 
Last edited:

ralke

(҂ ͠❛ ෴ ͡❛)ᕤ
Joined
Dec 17, 2011
Messages
695
Solutions
16
Reaction score
246
Location
Santiago - Chile
@potinho Nope, libboost_regex-vc120-mt-1_64.lib is a 64bit library. Same as all that you show here:
64bit libs.png
All this finish with lib64, this means they're all 64 bit libraries. If you wish to compile, then you need to correctly seach and use SDK and boosts for 32 bit. Or if you have lib folder instead of lib64, use lib.
Anyways, why you want a 32bit outcome? The mosts of the operating systems work with 64 bits now, be sure to identify well which operating system is your processor based 32-Bit vs. 64-Bit OSes: What's the Difference? (https://www.pcmag.com/news/32-bit-vs-64-bit-oses-whats-the-difference).

Regards!
 
OP
potinho

potinho

Member
Joined
Oct 11, 2009
Messages
265
Solutions
7
Reaction score
22
Location
Brazil
@potinho Nope, libboost_regex-vc120-mt-1_64.lib is a 64bit library. Same as all that you show here:
View attachment 57672
All this finish with lib64, this means they're all 64 bit libraries. If you wish to compile, then you need to correctly seach and use SDK and boosts for 32 bit. Or if you have lib folder instead of lib64, use lib.
Anyways, why you want a 32bit outcome? The mosts of the operating systems work with 64 bits now, be sure to identify well which operating system is your processor based 32-Bit vs. 64-Bit OSes: What's the Difference? (https://www.pcmag.com/news/32-bit-vs-64-bit-oses-whats-the-difference).

Regards!
Im using 32 bits cause my host machine is 32 bits.

Changed output files, but still getting the same error
1618333762794.png

1618333837293.png
Post automatically merged:

But now i tried compile using x64, and got the same error

1618334228840.png
 
Last edited:

ralke

(҂ ͠❛ ෴ ͡❛)ᕤ
Joined
Dec 17, 2011
Messages
695
Solutions
16
Reaction score
246
Location
Santiago - Chile
@potinho Hmm you're right. This is probably cause because libboost_regex-vc120-mt-1_64.lib is not specified for your platform toolset (it is specified on vc120 instead of vc141/vc140), sorry for miss that. This is related to lib64-msvc. Try to switch to another version of boosts that has 12.0 suffix in lib64-msvc lib, if i'm not wrong, the correct boosts you should run is 1_57_0 how is mentioned here fatal error LNK1104: cannot open file 'libboost_system-vc110-mt-gd-1_51.lib' (https://stackoverflow.com/questions/13042561/fatal-error-lnk1104-cannot-open-file-libboost-system-vc110-mt-gd-1-51-lib).+

Here is a video of how to compile old sources, try with the libs provided on that video description

However, i'm not sure this will work, I saw msvc/.vs folder of OTX2 and it is mentioned that is made for v140 toolset. You will need to test. But somewhere, in your sources, the solution is calling for libboost_regex-vc120-mt-1_64.lib, that's calling for vc120 and that is what confuses me.
 
Last edited:
OP
potinho

potinho

Member
Joined
Oct 11, 2009
Messages
265
Solutions
7
Reaction score
22
Location
Brazil
@potinho Hmm you're right. This is probably cause because libboost_regex-vc120-mt-1_64.lib is not specified for your platform toolset (it is specified on vc120 instead of vc141/vc140), sorry for miss that. This is related to lib64-msvc. Try to switch to another version of boosts that has 12.0 suffix in lib64-msvc lib, if i'm not wrong, the correct boosts you should run is 1_57_0 how is mentioned here fatal error LNK1104: cannot open file 'libboost_system-vc110-mt-gd-1_51.lib' (https://stackoverflow.com/questions/13042561/fatal-error-lnk1104-cannot-open-file-libboost-system-vc110-mt-gd-1-51-lib).+

Here is a video of how to compile old sources, try with the libs provided on that video description

However, i'm not sure this will work, I saw msvc/.vs folder of OTX2 and it is mentioned that is made for v140 toolset. You will need to test. But somewhere, in your sources, the solution is calling for libboost_regex-vc120-mt-1_64.lib, that's calling for vc120 and that is what confuses me.
Follow steps of video, dont work for me =/
 
Top