• 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.3 - 8.60] Problem after compiling TFS [vcpkg x64/x86 - MSVS 2019]

Ramon Bernardo

Well-Known Member
TFS Developer
Joined
Oct 7, 2018
Messages
137
Solutions
4
Reaction score
94
After compiling TFS gives no sign of life. The screen turns black when it opens and closes after a time of 1 to 3 seconds.

TFS 1.3 downgrade 8.60 by nekiro: Github

Using
Code:
MSVS 2019
Code:
VCPKG x64 / x84

PTS:
Code:
Visual Studio 2017 (v141)
I also tried with v142 but the memory error:
Code:
Error C2664 'void std :: _ Normal_allocator_traits <_Alloc> :: destroy <_Ty> (_Alloc &, _ Ty *)': Unable to convert an argument 1 from '_Alloc' to '_Alloc &'

Build log:
otpch.cpp
actions.cpp
ban.cpp
baseevents.cpp
bed.cpp
chat.cpp
combat.cpp
c:\users\pc\desktop\forgottenserver-8.6-downgrade\src\actions.cpp(499): warning C4100: 'isScripted': parâmetro formal não referenciado
condition.cpp
configmanager.cpp
connection.cpp
container.cpp
creature.cpp
c:\users\pc\vcpkg\installed\x64-windows\include\boost\variant\detail\forced_return.hpp(40): warning C4459: a declaração de 'dummy' oculta uma declaração global (compilando arquivo de origem ..\src\configmanager.cpp)
c:\users\pc\desktop\forgottenserver-8.6-downgrade\src\configmanager.cpp(202): note: consulte a declaração de 'dummy'
c:\users\pc\vcpkg\installed\x64-windows\include\boost\variant\detail\visitation_impl.hpp(162): note: consulte a referência à instanciação da função modelo 'T boost::detail::variant::forced_return<result_type>(void)' que está sendo compilada
with
[
T=result_type
] (compilando arquivo de origem ..\src\configmanager.cpp)
c:\users\pc\vcpkg\installed\x64-windows\include\boost\variant\detail\visitation_impl.hpp(231): note: consulte a referência à instanciação da função modelo 'void boost::detail::variant::visitation_impl_invoke<Visitor,VoidPtrCV,NoBackupFlag>(int,Visitor &,VoidPtrCV,boost::detail::variant::apply_visitor_unrolled *,NBF,long)' que está sendo compilada
with
[
Visitor=boost::detail::variant::destroyer,
VoidPtrCV=void *,
NoBackupFlag=boost::variant<boost::blank,std::string,int64_t,double,bool>::has_fallback_type_,
NBF=boost::variant<boost::blank,std::string,int64_t,double,bool>::has_fallback_type_
] (compilando arquivo de origem ..\src\configmanager.cpp)
c:\users\pc\vcpkg\installed\x64-windows\include\boost\variant\variant.hpp(2339): note: consulte a referência à instanciação da função modelo 'void boost::detail::variant::visitation_impl<first_which,first_step,Visitor,VoidPtrCV,boost::variant<boost::blank,std::string,int64_t,double,bool>::has_fallback_type_>(const int,const int,Visitor &,VoidPtrCV,boost::mpl::false_,NoBackupFlag,Which *,step0 *)' que está sendo compilada
with
[
Visitor=boost::detail::variant::destroyer,
VoidPtrCV=void *,
NoBackupFlag=boost::variant<boost::blank,std::string,int64_t,double,bool>::has_fallback_type_,
Which=first_which,
step0=first_step
] (compilando arquivo de origem ..\src\configmanager.cpp)
c:\users\pc\vcpkg\installed\x64-windows\include\boost\variant\variant.hpp(2348): note: consulte a referência à instanciação da função modelo 'void boost::variant<boost::blank,std::string,int64_t,double,bool>::internal_apply_visitor_impl<Visitor,void*>(int,int,Visitor &,VoidPtrCV)' que está sendo compilada
with
[
Visitor=boost::detail::variant::destroyer,
VoidPtrCV=void *
] (compilando arquivo de origem ..\src\configmanager.cpp)
c:\users\pc\vcpkg\installed\x64-windows\include\boost\variant\variant.hpp(2346): note: consulte a referência à instanciação da função modelo 'void boost::variant<boost::blank,std::string,int64_t,double,bool>::internal_apply_visitor_impl<Visitor,void*>(int,int,Visitor &,VoidPtrCV)' que está sendo compilada
with
[
Visitor=boost::detail::variant::destroyer,
VoidPtrCV=void *
] (compilando arquivo de origem ..\src\configmanager.cpp)
c:\users\pc\vcpkg\installed\x64-windows\include\boost\variant\variant.hpp(1365): note: consulte a referência à instanciação da função modelo 'void boost::variant<boost::blank,std::string,int64_t,double,bool>::internal_apply_visitor<boost::detail::variant::destroyer>(Visitor &)' que está sendo compilada
with
[
Visitor=boost::detail::variant::destroyer
] (compilando arquivo de origem ..\src\configmanager.cpp)
c:\users\pc\vcpkg\installed\x64-windows\include\boost\variant\variant.hpp(1365): note: consulte a referência à instanciação da função modelo 'void boost::variant<boost::blank,std::string,int64_t,double,bool>::internal_apply_visitor<boost::detail::variant::destroyer>(Visitor &)' que está sendo compilada
with
[
Visitor=boost::detail::variant::destroyer
] (compilando arquivo de origem ..\src\configmanager.cpp)
c:\users\pc\vcpkg\installed\x64-windows\include\boost\variant\variant.hpp(1363): note: ao compilar a função membro '<Desconhecido>' de classe <Desconhecido> (compilando arquivo de origem ..\src\configmanager.cpp)
c:\users\pc\vcpkg\installed\x64-windows\include\boost\variant\variant.hpp(1372): note: consulte a referência à instanciação da função modelo 'void boost::variant<boost::blank,std::string,int64_t,double,bool>::destroy_content(void) noexcept' que está sendo compilada (compilando arquivo de origem ..\src\configmanager.cpp)
c:\users\pc\desktop\forgottenserver-8.6-downgrade\src\item.h(218): note: consulte a referência à instanciação '<Desconhecido>' de classe <Desconhecido> que está sendo compilada (compilando arquivo de origem ..\src\configmanager.cpp)
creatureevent.cpp
cylinder.cpp
database.cpp
databasemanager.cpp
databasetasks.cpp
depotchest.cpp
depotlocker.cpp
events.cpp
fileloader.cpp
game.cpp
globalevent.cpp
groups.cpp
guild.cpp
house.cpp
housetile.cpp
ioguild.cpp
iologindata.cpp
iomap.cpp
iomapserialize.cpp
item.cpp
items.cpp
luascript.cpp
mailbox.cpp
map.cpp
monster.cpp
monsters.cpp
movement.cpp
networkmessage.cpp
npc.cpp
otserv.cpp
outfit.cpp
outputmessage.cpp
party.cpp
player.cpp
position.cpp
protocol.cpp
protocolgame.cpp
protocollogin.cpp
protocolold.cpp
quests.cpp
raids.cpp
rsa.cpp
scheduler.cpp
script.cpp
scriptmanager.cpp
server.cpp
signals.cpp
spawn.cpp
spells.cpp
protocolstatus.cpp
talkaction.cpp
tasks.cpp
teleport.cpp
thing.cpp
tile.cpp
tools.cpp
trashholder.cpp
vocation.cpp
waitlist.cpp
weapons.cpp
wildcardtree.cpp
xtea.cpp
Gerando código
Finalizada a geração de código
theforgottenserver.vcxproj -> C:\Users\PC\Desktop\forgottenserver-8.6-downgrade\vc14\x64\Release\theforgottenserver-x64.exe

Problem:

1575552714755.png
1575552787029.png
The above example is compiled on x86 but I did the same with x64.
I put all the folders to run through the doubts. (I also put the config.lua)

I also tried compiling with boost + SDK (MSVS 2015-17-19)
Code:
boost_1_62_0 (32bit e 64bit)
boost_1_66_0 (32bit e 64bit)
Code:
SDK 3.2

Windows SDK:
Code:
10.0.17763.0
10.0.18362.0
8.1

Problem:
Code:
Unable to open file include: 'pugixml.hpp': No such file or directorY

Translation by google.
 
Open it through CMD, just go to the directory and write theforgottenserver.exe and then paste what error you get.
Did you add your mysql/database info? User,password and name?
Why using Visual Studio 2019 instead of 2017? I can see few warnings while compiling I think the reason is using Visual Studio 2019.
 
Open it through CMD, just go to the directory and write theforgottenserver.exe and then paste what error you get.
Did you add your mysql/database info? User,password and name?
Why using Visual Studio 2019 instead of 2017? I can see few warnings while compiling I think the reason is using Visual Studio 2019.
Tried by PowerShell/CMD, no errors and neither ran.
1575554828464.png
1575554888835.png

Yes, I added all mysql data to the configuration.
I used the versions 2015, 2017 and 2019. They all give the same error, but compiles without problem.
Perhaps this error is common.
 

It didn't work
Lockfree.h
/**
* The Forgotten Server - a free and open-source MMORPG server emulator
* Copyright (C) 2019 Mark Samman <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef FS_LOCKFREE_H_8C707AEB7C7235A2FBC5D4EDDF03B008
#define FS_LOCKFREE_H_8C707AEB7C7235A2FBC5D4EDDF03B008

#if _MSC_FULL_VER >= 190023918 // Workaround for VS2015 Update 2. Boost.Lockfree is a header-only library, so this should be safe to do.
#define _ENABLE_ATOMIC_ALIGNMENT_FIX
#endif

#include <boost/lockfree/stack.hpp>

/*
* we use this to avoid instantiating multiple free lists for objects of the
* same size and it can be replaced by a variable template in C++14
*
* template <std::size_t TSize, size_t CAPACITY>
* boost::lockfree::stack<void*, boost::lockfree::capacity<CAPACITY> lockfreeFreeList;
*/
template <std::size_t TSize, size_t CAPACITY>
struct LockfreeFreeList
{
using FreeList = boost::lockfree::stack<void*, boost::lockfree::capacity<CAPACITY>>;
static FreeList& get()
{
static FreeList freeList;
return freeList;
}
};


template <typename T, size_t CAPACITY>
class LockfreePoolingAllocator : public std::allocator<T>
{
public:
LockfreePoolingAllocator() = default;

template <typename U, class = typename std::enable_if<!std::is_same<U, T>::value>::type>
explicit constexpr LockfreePoolingAllocator(const U&) {}
using value_type = T;

T* allocate(size_t) const {
auto& inst = LockfreeFreeList<sizeof(T), CAPACITY>::get();
void* p; // NOTE: p doesn't have to be initialized
if (!inst.pop(p)) {
//Acquire memory without calling the constructor of T
p = operator new (sizeof(T));
}
return static_cast<T*>(p);
}

void deallocate(T* p, size_t) const {
auto& inst = LockfreeFreeList<sizeof(T), CAPACITY>::get();
if (!inst.bounded_push(p)) {
//Release memory without calling the destructor of T
//(it has already been called at this point)
operator delete(p);
}
}
};

#endif

Outputmessage.cpp
/**
* The Forgotten Server - a free and open-source MMORPG server emulator
* Copyright (C) 2019 Mark Samman <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#include "otpch.h"

#include "outputmessage.h"
#include "protocol.h"
#include "lockfree.h"
#include "scheduler.h"

extern Scheduler g_scheduler;

const uint16_t OUTPUTMESSAGE_FREE_LIST_CAPACITY = 2048;
const std::chrono::milliseconds OUTPUTMESSAGE_AUTOSEND_DELAY {10};

void OutputMessagePool::scheduleSendAll()
{
auto functor = std::bind(&OutputMessagePool::sendAll, this);
g_scheduler.addEvent(createSchedulerTask(OUTPUTMESSAGE_AUTOSEND_DELAY.count(), functor));
}

void OutputMessagePool::sendAll()
{
//dispatcher thread
for (auto& protocol : bufferedProtocols) {
auto& msg = protocol->getCurrentBuffer();
if (msg) {
protocol->send(std::move(msg));
}
}

if (!bufferedProtocols.empty()) {
scheduleSendAll();
}
}

void OutputMessagePool::addProtocolToAutosend(Protocol_ptr protocol)
{
//dispatcher thread
if (bufferedProtocols.empty()) {
scheduleSendAll();
}
bufferedProtocols.emplace_back(protocol);
}

void OutputMessagePool::removeProtocolFromAutosend(const Protocol_ptr& protocol)
{
//dispatcher thread
auto it = std::find(bufferedProtocols.begin(), bufferedProtocols.end(), protocol);
if (it != bufferedProtocols.end()) {
std::swap(*it, bufferedProtocols.back());
bufferedProtocols.pop_back();
}
}

OutputMessage_ptr OutputMessagePool::getOutputMessage()
{
// LockfreePoolingAllocator<void,...> will leave (void* allocate) ill-formed because
// of sizeof(T), so this guaranatees that only one list will be initialized
return std::allocate_shared<OutputMessage>(LockfreePoolingAllocator<void, OUTPUTMESSAGE_FREE_LIST_CAPACITY>());
}

Build log:
otpch.cpp
actions.cpp
ban.cpp
baseevents.cpp
bed.cpp
chat.cpp
combat.cpp
c:\users\pc\desktop\forgottenserver-8.6-downgrade\src\actions.cpp(499): warning C4100: 'isScripted': parâmetro formal não referenciado
condition.cpp
configmanager.cpp
connection.cpp
container.cpp
creature.cpp
c:\users\pc\vcpkg\installed\x64-windows\include\boost\variant\detail\forced_return.hpp(40): warning C4459: a declaração de 'dummy' oculta uma declaração global (compilando arquivo de origem ..\src\configmanager.cpp)
c:\users\pc\desktop\forgottenserver-8.6-downgrade\src\configmanager.cpp(202): note: consulte a declaração de 'dummy'
c:\users\pc\vcpkg\installed\x64-windows\include\boost\variant\detail\visitation_impl.hpp(162): note: consulte a referência à instanciação da função modelo 'T boost::detail::variant::forced_return<result_type>(void)' que está sendo compilada
with
[
T=result_type
] (compilando arquivo de origem ..\src\configmanager.cpp)
c:\users\pc\vcpkg\installed\x64-windows\include\boost\variant\detail\visitation_impl.hpp(231): note: consulte a referência à instanciação da função modelo 'void boost::detail::variant::visitation_impl_invoke<Visitor,VoidPtrCV,NoBackupFlag>(int,Visitor &,VoidPtrCV,boost::detail::variant::apply_visitor_unrolled *,NBF,long)' que está sendo compilada
with
[
Visitor=boost::detail::variant::destroyer,
VoidPtrCV=void *,
NoBackupFlag=boost::variant<boost::blank,std::string,int64_t,double,bool>::has_fallback_type_,
NBF=boost::variant<boost::blank,std::string,int64_t,double,bool>::has_fallback_type_
] (compilando arquivo de origem ..\src\configmanager.cpp)
c:\users\pc\vcpkg\installed\x64-windows\include\boost\variant\variant.hpp(2339): note: consulte a referência à instanciação da função modelo 'void boost::detail::variant::visitation_impl<first_which,first_step,Visitor,VoidPtrCV,boost::variant<boost::blank,std::string,int64_t,double,bool>::has_fallback_type_>(const int,const int,Visitor &,VoidPtrCV,boost::mpl::false_,NoBackupFlag,Which *,step0 *)' que está sendo compilada
with
[
Visitor=boost::detail::variant::destroyer,
VoidPtrCV=void *,
NoBackupFlag=boost::variant<boost::blank,std::string,int64_t,double,bool>::has_fallback_type_,
Which=first_which,
step0=first_step
] (compilando arquivo de origem ..\src\configmanager.cpp)
c:\users\pc\vcpkg\installed\x64-windows\include\boost\variant\variant.hpp(2348): note: consulte a referência à instanciação da função modelo 'void boost::variant<boost::blank,std::string,int64_t,double,bool>::internal_apply_visitor_impl<Visitor,void*>(int,int,Visitor &,VoidPtrCV)' que está sendo compilada
with
[
Visitor=boost::detail::variant::destroyer,
VoidPtrCV=void *
] (compilando arquivo de origem ..\src\configmanager.cpp)
c:\users\pc\vcpkg\installed\x64-windows\include\boost\variant\variant.hpp(2346): note: consulte a referência à instanciação da função modelo 'void boost::variant<boost::blank,std::string,int64_t,double,bool>::internal_apply_visitor_impl<Visitor,void*>(int,int,Visitor &,VoidPtrCV)' que está sendo compilada
with
[
Visitor=boost::detail::variant::destroyer,
VoidPtrCV=void *
] (compilando arquivo de origem ..\src\configmanager.cpp)
c:\users\pc\vcpkg\installed\x64-windows\include\boost\variant\variant.hpp(1365): note: consulte a referência à instanciação da função modelo 'void boost::variant<boost::blank,std::string,int64_t,double,bool>::internal_apply_visitor<boost::detail::variant::destroyer>(Visitor &)' que está sendo compilada
with
[
Visitor=boost::detail::variant::destroyer
] (compilando arquivo de origem ..\src\configmanager.cpp)
c:\users\pc\vcpkg\installed\x64-windows\include\boost\variant\variant.hpp(1365): note: consulte a referência à instanciação da função modelo 'void boost::variant<boost::blank,std::string,int64_t,double,bool>::internal_apply_visitor<boost::detail::variant::destroyer>(Visitor &)' que está sendo compilada
with
[
Visitor=boost::detail::variant::destroyer
] (compilando arquivo de origem ..\src\configmanager.cpp)
c:\users\pc\vcpkg\installed\x64-windows\include\boost\variant\variant.hpp(1363): note: ao compilar a função membro '<Desconhecido>' de classe <Desconhecido> (compilando arquivo de origem ..\src\configmanager.cpp)
c:\users\pc\vcpkg\installed\x64-windows\include\boost\variant\variant.hpp(1372): note: consulte a referência à instanciação da função modelo 'void boost::variant<boost::blank,std::string,int64_t,double,bool>::destroy_content(void) noexcept' que está sendo compilada (compilando arquivo de origem ..\src\configmanager.cpp)
c:\users\pc\desktop\forgottenserver-8.6-downgrade\src\item.h(218): note: consulte a referência à instanciação '<Desconhecido>' de classe <Desconhecido> que está sendo compilada (compilando arquivo de origem ..\src\configmanager.cpp)
creatureevent.cpp
cylinder.cpp
database.cpp
databasemanager.cpp
databasetasks.cpp
depotchest.cpp
depotlocker.cpp
events.cpp
fileloader.cpp
game.cpp
globalevent.cpp
groups.cpp
guild.cpp
house.cpp
housetile.cpp
ioguild.cpp
iologindata.cpp
iomap.cpp
iomapserialize.cpp
item.cpp
items.cpp
luascript.cpp
mailbox.cpp
map.cpp
monster.cpp
monsters.cpp
movement.cpp
networkmessage.cpp
npc.cpp
otserv.cpp
outfit.cpp
outputmessage.cpp
party.cpp
player.cpp
position.cpp
protocol.cpp
protocolgame.cpp
protocollogin.cpp
protocolold.cpp
quests.cpp
raids.cpp
rsa.cpp
scheduler.cpp
script.cpp
scriptmanager.cpp
server.cpp
signals.cpp
spawn.cpp
spells.cpp
protocolstatus.cpp
talkaction.cpp
tasks.cpp
teleport.cpp
thing.cpp
tile.cpp
tools.cpp
trashholder.cpp
vocation.cpp
waitlist.cpp
weapons.cpp
wildcardtree.cpp
xtea.cpp
Gerando código
Finalizada a geração de código
theforgottenserver.vcxproj -> C:\Users\PC\Desktop\forgottenserver-8.6-downgrade\vc14\x64\Release\theforgottenserver-x64.exe
 
No error, thanks.

Build log:
otpch.cpp
actions.cpp
ban.cpp
baseevents.cpp
bed.cpp
chat.cpp
combat.cpp
c:\users\pc\desktop\forgottenserver-8.6-downgrade\src\actions.cpp(499): warning C4100: 'isScripted': parâmetro formal não referenciado
condition.cpp
configmanager.cpp
connection.cpp
container.cpp
creature.cpp
creatureevent.cpp
cylinder.cpp
database.cpp
databasemanager.cpp
databasetasks.cpp
depotchest.cpp
depotlocker.cpp
events.cpp
fileloader.cpp
game.cpp
globalevent.cpp
groups.cpp
guild.cpp
house.cpp
housetile.cpp
ioguild.cpp
iologindata.cpp
iomap.cpp
iomapserialize.cpp
item.cpp
items.cpp
luascript.cpp
mailbox.cpp
map.cpp
monster.cpp
monsters.cpp
movement.cpp
networkmessage.cpp
npc.cpp
otserv.cpp
outfit.cpp
outputmessage.cpp
party.cpp
player.cpp
position.cpp
protocol.cpp
protocolgame.cpp
protocollogin.cpp
protocolold.cpp
quests.cpp
raids.cpp
rsa.cpp
scheduler.cpp
script.cpp
scriptmanager.cpp
server.cpp
signals.cpp
spawn.cpp
spells.cpp
protocolstatus.cpp
talkaction.cpp
tasks.cpp
teleport.cpp
thing.cpp
tile.cpp
tools.cpp
trashholder.cpp
vocation.cpp
waitlist.cpp
weapons.cpp
wildcardtree.cpp
xtea.cpp
Gerando código
Finalizada a geração de código
theforgottenserver.vcxproj -> C:\Users\PC\Desktop\forgottenserver-8.6-downgrade\vc14\x64\Release\theforgottenserver-x64.exe

TFS is using SDK Win10 ver. 10.0.17134.0 [x64]


I'm compiling now with this version, let's see.
1575559004267.png

Build log (10.0.17134.0)
otpch.cpp
actions.cpp
ban.cpp
baseevents.cpp
bed.cpp
chat.cpp
combat.cpp
c:\users\pc\desktop\forgottenserver-8.6-downgrade\src\actions.cpp(499): warning C4100: 'isScripted': parâmetro formal não referenciado
condition.cpp
configmanager.cpp
connection.cpp
container.cpp
creature.cpp
creatureevent.cpp
cylinder.cpp
database.cpp
databasemanager.cpp
databasetasks.cpp
depotchest.cpp
depotlocker.cpp
events.cpp
fileloader.cpp
game.cpp
globalevent.cpp
groups.cpp
guild.cpp
house.cpp
housetile.cpp
ioguild.cpp
iologindata.cpp
iomap.cpp
iomapserialize.cpp
item.cpp
items.cpp
luascript.cpp
mailbox.cpp
map.cpp
monster.cpp
monsters.cpp
movement.cpp
networkmessage.cpp
npc.cpp
otserv.cpp
outfit.cpp
outputmessage.cpp
party.cpp
player.cpp
position.cpp
protocol.cpp
protocolgame.cpp
protocollogin.cpp
protocolold.cpp
quests.cpp
raids.cpp
rsa.cpp
scheduler.cpp
script.cpp
scriptmanager.cpp
server.cpp
signals.cpp
spawn.cpp
spells.cpp
protocolstatus.cpp
talkaction.cpp
tasks.cpp
teleport.cpp
thing.cpp
tile.cpp
tools.cpp
trashholder.cpp
vocation.cpp
waitlist.cpp
weapons.cpp
wildcardtree.cpp
xtea.cpp
Gerando código
Finalizada a geração de código
theforgottenserver.vcxproj -> C:\Users\PC\Desktop\forgottenserver-8.6-downgrade\vc14\x64\Release\theforgottenserver-x64.exe

Problem:
1575558581829.png

Build log [x86]
otpch.cpp
actions.cpp
ban.cpp
baseevents.cpp
bed.cpp
chat.cpp
combat.cpp
condition.cpp
configmanager.cpp
connection.cpp
container.cpp
creature.cpp
creatureevent.cpp
cylinder.cpp
database.cpp
databasemanager.cpp
databasetasks.cpp
depotchest.cpp
depotlocker.cpp
events.cpp
fileloader.cpp
game.cpp
globalevent.cpp
groups.cpp
guild.cpp
house.cpp
housetile.cpp
ioguild.cpp
iologindata.cpp
iomap.cpp
iomapserialize.cpp
item.cpp
items.cpp
luascript.cpp
mailbox.cpp
map.cpp
monster.cpp
monsters.cpp
movement.cpp
networkmessage.cpp
npc.cpp
otserv.cpp
outfit.cpp
outputmessage.cpp
party.cpp
player.cpp
position.cpp
protocol.cpp
protocolgame.cpp
protocollogin.cpp
protocolold.cpp
quests.cpp
raids.cpp
rsa.cpp
scheduler.cpp
script.cpp
scriptmanager.cpp
server.cpp
signals.cpp
spawn.cpp
spells.cpp
protocolstatus.cpp
talkaction.cpp
tasks.cpp
teleport.cpp
thing.cpp
tile.cpp
tools.cpp
trashholder.cpp
vocation.cpp
waitlist.cpp
weapons.cpp
wildcardtree.cpp
xtea.cpp
Gerando código
Finalizada a geração de código
theforgottenserver.vcxproj -> C:\Users\PC\Desktop\forgottenserver-8.6-downgrade\vc14\Release\theforgottenserver-Win32.exe

Problem:
1575558909346.png
 

Attachments

You probably didn't set up a database to run the server, so it closes instantly. That's not a problem with compilation.
I think the opposite, if I didn't have a database I would have an error and not a black console.
I previously compiled in linux and it worked normally.

Example TFS 0.4:
config.lua does not exist
1575560006334.png
mysql host does not exist
1575560040491.png
data does not exist
1575560085373.png
 
I think the opposite, if I didn't have a database I would have an error and not a black console.[/SPOILER]
You thought wrong. In newer TFS versions, the console will not halt for an error. The error will still show, but you have to open it through a terminal to be able to see it. 99% of the time this happens because you didn't set up a database for your server, or it cannot be connected to because of invalid credentials / wrong database name.

Open the exe through cmd by typing cd "your_tfs_directory" then typing theforgottenserver-x64.exe and wait for it to show you an error then we proceed from there.
 
You thought wrong. In newer TFS versions, the console will not halt for an error. The error will still show, but you have to open it through a terminal to be able to see it. 99% of the time this happens because you didn't set up a database for your server, or it cannot be connected to because of invalid credentials / wrong database name.

Open the exe through cmd by typing cd "your_tfs_directory" then typing theforgottenserver-x64.exe and wait for it to show you an error then we proceed from there.
No errors. I think the problem is in the DLLs.
1575562114983.png
 
If it was DLLs it wouldn't start at all.
Go to Project->theforgottenserver properties->Debugging->Working Directory and change the directory to the base of your TFS directory (C:\users\PC\Desktop\SV), press OK and debug by pressing F5.
 
To compile TFS 1.2 or 1.3 under MSVS 2019 you have to:

1. use VS v141 compiler
2. use Win10 SDK 10.0.17134.0
3. use vcpkg with all stuff downloaded via Git based on tutorial from TFS 1.2 on GitHub
4. recomplie cryptopp to /MD (you donwloaded it via vcpkg in step 3) under VS with compiler v142 and latest SDK
5. add additional directories 'vcpkg' and TFS 3.2 SDK's 'LuaJIT/include'
6. add additional libs 'vcpkg' and 'LuaJIT/lib 64 or 32'
 
If it was DLLs it wouldn't start at all.
Go to Project->theforgottenserver properties->Debugging->Working Directory and change the directory to the base of your TFS directory (C:\users\PC\Desktop\SV), press OK and debug by pressing F5.
I changed the language of msvs for you to understand.

Stopped here
1575563469486.png[/SPOILE]
 

Attachments

Why are you compiling in 32 bit mode? You arent using 64 bit system?
Post automatically merged:

Don't look at the code or crash logs you get, that engine is working just fine out of the box, the thing you are getting must be regarding invalid compilation or some shitty dlls
 
Why are you compiling in 32 bit mode? You arent using 64 bit system?
I tried to compile on both x84 and x64 but both gave black console.
To compile TFS 1.2 or 1.3 under MSVS 2019 you have to:

1. use VS v141 compiler
2. use Win10 SDK 10.0.17134.0
3. use vcpkg with all stuff downloaded via Git based on tutorial from TFS 1.2 on GitHub
4. recomplie cryptopp to /MD (you donwloaded it via vcpkg in step 3) under VS with compiler v142 and latest SDK
5. add additional directories 'vcpkg' and TFS 3.2 SDK's 'LuaJIT/include'

6. add additional libs 'vcpkg' and 'LuaJIT/lib 64 or 32'

I used github's vcpkg, followed the tutorial there. I installed lib x64 and x86.
I followed this tutorial.

I did not understand:
Code:
5. add additional directories 'vcpkg' and TFS 3.2 SDK's 'LuaJIT/include'
6. add additional libs 'vcpkg' and 'LuaJIT/lib 64 or 32'

1575563744414.png
 
All you need to do to compile in vs 2017 is install required vcpkg libs

Then you need to change the sdk version to one that you have installed, wait till it parse all things and then hit recompile.
 
Solution
Back
Top