• 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 The Forgotten Server latest source code - Last Update: 02/12/2010

I NEVER GET THIS TO WORK.. I Have Allways problem with TFS C++...
Please Help me! :(

Code:
24 C:\Documents and Settings\Christoffer\Skrivbord\FORGOTTEN\forgottenserver\trunk\admin.cpp In file included from ../admin.cpp 
25 C:\Documents and Settings\Christoffer\Skrivbord\FORGOTTEN\forgottenserver\trunk\connection.h boost/asio.hpp: No such file or directory. 
24 C:\Documents and Settings\Christoffer\Skrivbord\FORGOTTEN\forgottenserver\trunk\admin.cpp In file included from ../admin.cpp 
65 C:\Documents and Settings\Christoffer\Skrivbord\FORGOTTEN\forgottenserver\trunk\connection.h `boost::asio' has not been declared 
65 C:\Documents and Settings\Christoffer\Skrivbord\FORGOTTEN\forgottenserver\trunk\connection.h expected `;' before '(' token 
102 C:\Documents and Settings\Christoffer\Skrivbord\FORGOTTEN\forgottenserver\trunk\connection.h `boost::asio' has not been declared 
102 C:\Documents and Settings\Christoffer\Skrivbord\FORGOTTEN\forgottenserver\trunk\connection.h expected `)' before '&' token 
130 C:\Documents and Settings\Christoffer\Skrivbord\FORGOTTEN\forgottenserver\trunk\connection.h `boost::asio' has not been declared 
130 C:\Documents and Settings\Christoffer\Skrivbord\FORGOTTEN\forgottenserver\trunk\connection.h ISO C++ forbids declaration of `socket' with no type 
130 C:\Documents and Settings\Christoffer\Skrivbord\FORGOTTEN\forgottenserver\trunk\connection.h expected `;' before '&' token 
132 C:\Documents and Settings\Christoffer\Skrivbord\FORGOTTEN\forgottenserver\trunk\connection.h expected `;' before "void" 
140 C:\Documents and Settings\Christoffer\Skrivbord\FORGOTTEN\forgottenserver\trunk\connection.h `boost::system' has not been declared 
140 C:\Documents and Settings\Christoffer\Skrivbord\FORGOTTEN\forgottenserver\trunk\connection.h expected `,' or `...' before '&' token 
140 C:\Documents and Settings\Christoffer\Skrivbord\FORGOTTEN\forgottenserver\trunk\connection.h ISO C++ forbids declaration of `error_code' with no type 
141 C:\Documents and Settings\Christoffer\Skrivbord\FORGOTTEN\forgottenserver\trunk\connection.h `boost::system' has not been declared 
141 C:\Documents and Settings\Christoffer\Skrivbord\FORGOTTEN\forgottenserver\trunk\connection.h expected `,' or `...' before '&' token 
141 C:\Documents and Settings\Christoffer\Skrivbord\FORGOTTEN\forgottenserver\trunk\connection.h ISO C++ forbids declaration of `error_code' with no type 
143 C:\Documents and Settings\Christoffer\Skrivbord\FORGOTTEN\forgottenserver\trunk\connection.h `boost::system' has not been declared 
143 C:\Documents and Settings\Christoffer\Skrivbord\FORGOTTEN\forgottenserver\trunk\connection.h expected `,' or `...' before '&' token 
143 C:\Documents and Settings\Christoffer\Skrivbord\FORGOTTEN\forgottenserver\trunk\connection.h ISO C++ forbids declaration of `error_code' with no type 
145 C:\Documents and Settings\Christoffer\Skrivbord\FORGOTTEN\forgottenserver\trunk\connection.h `boost::system' has not been declared 
145 C:\Documents and Settings\Christoffer\Skrivbord\FORGOTTEN\forgottenserver\trunk\connection.h expected `,' or `...' before '&' token 
145 C:\Documents and Settings\Christoffer\Skrivbord\FORGOTTEN\forgottenserver\trunk\connection.h ISO C++ forbids declaration of `error_code' with no type 
146 C:\Documents and Settings\Christoffer\Skrivbord\FORGOTTEN\forgottenserver\trunk\connection.h `boost::system' has not been declared 
146 C:\Documents and Settings\Christoffer\Skrivbord\FORGOTTEN\forgottenserver\trunk\connection.h expected `,' or `...' before '&' token 
146 C:\Documents and Settings\Christoffer\Skrivbord\FORGOTTEN\forgottenserver\trunk\connection.h ISO C++ forbids declaration of `error_code' with no type 
155 C:\Documents and Settings\Christoffer\Skrivbord\FORGOTTEN\forgottenserver\trunk\connection.h `boost::asio' has not been declared 
155 C:\Documents and Settings\Christoffer\Skrivbord\FORGOTTEN\forgottenserver\trunk\connection.h ISO C++ forbids declaration of `socket' with no type 
155 C:\Documents and Settings\Christoffer\Skrivbord\FORGOTTEN\forgottenserver\trunk\connection.h expected `;' before "m_socket" 
 C:\Documents and Settings\Christoffer\Skrivbord\FORGOTTEN\forgottenserver\trunk\dev-cpp\Makefile.win [Build Error]  [obj//admin.o] Error 1

Regards,
Vellor

Download the devcpp from the 1st page, it won't give these errors.
 
I'm tryning compile my TFS engine on Red Hat linux but I have some errors;

[root@dedicated trunk]# make
g++ -I. -I/usr/include/libxml2 -I/usr/include/lua5.1 -D__NO_HOMEDIR_CONF__ -D__U SE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -Werror -O1 -c accoun t.cpp
g++ -I. -I/usr/include/libxml2 -I/usr/include/lua5.1 -D__NO_HOMEDIR_CONF__ -D__U SE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -Werror -O1 -c action s.cpp
g++ -I. -I/usr/include/libxml2 -I/usr/include/lua5.1 -D__NO_HOMEDIR_CONF__ -D__U SE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -Werror -O1 -c admin. cpp
In file included from /usr/local/include/boost/asio/detail/reactor_op_queue.hpp: 25,
from /usr/local/include/boost/asio/detail/select_reactor.hpp:34 ,
from /usr/local/include/boost/asio/impl/io_service.ipp:27,
from /usr/local/include/boost/asio/io_service.hpp:517,
from /usr/local/include/boost/asio/basic_io_object.hpp:20,
from /usr/local/include/boost/asio/basic_socket.hpp:20,
from /usr/local/include/boost/asio/basic_datagram_socket.hpp:25 ,
from /usr/local/include/boost/asio.hpp:18,
from connection.h:25,
from admin.cpp:24:
/usr/local/include/boost/asio/detail/hash_map.hpp:24:37: error: boost/functional /hash.hpp: No such file or directory
/usr/local/include/boost/asio/detail/hash_map.hpp: In function âsize_t boost::as io::detail::calculate_hash_value(const T&)â:
/usr/local/include/boost/asio/detail/hash_map.hpp:37: error: âhash_valueâ is not a member of âboostâ
/usr/local/include/boost/asio/time_traits.hpp: In static member function âstatic boost::posix_time::ptime boost::asio::time_traits<boost::posix_time::ptime>::no w()â:
/usr/local/include/boost/asio/time_traits.hpp:46: error: âuniversal_timeâ is not a member of âboost::posix_time::microsec_clockâ
make: *** [admin.o] Error 1

Solved
 
Last edited:
More Erros.

I've found more erros on compilation, look.

[root@dedicated trunk]# make
g++ -I. -I/usr/include/libxml2 -I/usr/include/lua5.1 -D__NO_HOMEDIR_CONF__ -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -Werror -O1 -o ./TheForgottenServer account.o actions.o admin.o allocator.o baseevents.o beds.o creature.o creatureevent.o chat.o combat.o commands.o condition.o configmanager.o connection.o container.o cylinder.o database.o databasemysql.o databasesqlite.o depot.o exception.o fileloader.o game.o gui.o house.o housetile.o ioban.o ioguild.o iologindata.o iomap.o iomapserialize.o inputbox.o item.o items.o logger.o luascript.o mailbox.o map.o md5.o monster.o monsters.o movement.o networkmessage.o npc.o otserv.o outfit.o outputmessage.o party.o player.o playerbox.o position.o protocol.o protocolgame.o protocollogin.o quests.o raids.o rsa.o scheduler.o scriptmanager.o server.o sha1.o spawn.o spells.o status.o talkaction.o tasks.o teleport.o textlogger.o thing.o tile.o tools.o trashholder.o vocation.o waitlist.o weapons.o -L/usr/lib -lxml2 -lpthread -llua5.1 -lboost_thread -lgmp -lmysqlclient -lboost_regex -lsqlite3 -ldl -lboost_system

house.o(.text+0xa93): In function `AccessList::addExpression(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
house.cpp: undefined reference to `boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::do_assign(char const*, char const*, unsigned int)'
house.o(.text+0xc79):house.cpp: undefined reference to `boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::do_assign(char const*, char const*, unsigned int)'
house.o(.gnu.linkonce.t._ZN5boost9re_detail16re_is_set_memberIPKccNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEjEET_S8_S8_PKNS0_11re_set_longIT2_EERKNS0_10regex_dataIT0_T1_EEb[char const* boost::re_detail::re_is_set_member<char const*, char, boost::regex_traits<char, boost::cpp_regex_traits<char> >, unsigned int>(char const*, char const*, boost::re_detail::re_set_long<unsigned int> const*, boost::re_detail::regex_data<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, bool)]+0x258): In function `char const* boost::re_detail::re_is_set_member<char const*, char, boost::regex_traits<char, boost::cpp_regex_traits<char> >, unsigned int>(char const*, char const*, boost::re_detail::re_set_long<unsigned int> const*, boost::re_detail::regex_data<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, bool)':
house.cpp: undefined reference to `boost::re_detail::cpp_regex_traits_implementation<char>::transform(char const*, char const*) const'
house.o(.gnu.linkonce.t._ZN5boost9re_detail16re_is_set_memberIPKccNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEjEET_S8_S8_PKNS0_11re_set_longIT2_EERKNS0_10regex_dataIT0_T1_EEb[char const* boost::re_detail::re_is_set_member<char const*, char, boost::regex_traits<char, boost::cpp_regex_traits<char> >, unsigned int>(char const*, char const*, boost::re_detail::re_set_long<unsigned int> const*, boost::re_detail::regex_data<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, bool)]+0x403):house.cpp: undefined reference to `boost::re_detail::cpp_regex_traits_implementation<char>::transform_primary(char const*, char const*) const'
house.o(.gnu.linkonce.t._ZN5boost9re_detail11raise_errorINS_20regex_traits_wrapperINS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEEEvRKT_NS_15regex_constants10error_typeE[void boost::re_detail::raise_error<boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > >(boost::regex_traits_wrapper<boost::regex_traits<cchar, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::error_type)]+0x63): In function `void boost::re_detail::raise_error<boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > >(boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::error_type)':
house.cpp: undefined reference to `boost::re_detail::get_default_error_string(boost::regex_constants::error_type)'
house.o(.gnu.linkonce.t._ZN5boost9re_detail11raise_errorINS_20regex_traits_wrapperINS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEEEvRKT_NS_15regex_constants10error_typeE[void boost::re_detail::raise_error<boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > >(boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::error_type)]+0xa0):house.cpp: undefined reference to `boost::re_detail::get_default_error_string(boost::regex_constants::error_type)'
house.o(.gnu.linkonce.t._ZN5boost9re_detail11raise_errorINS_20regex_traits_wrapperINS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEEEvRKT_NS_15regex_constants10error_typeE[void boost::re_detail::raise_error<boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > >(boost::regex_traits_wra

(..)

collect2: ld returned 1 exit status
make: *** [theforgottenserver] Error 1
 
I compiled everything with no problems but when i`m starting served i see console and "press any key continue..."

I am getting the same result. I run the .exe file that I made, but a cmd window comes up saying 'Press any key to continue...'. If I press any key the cmd window closes. No server is running...

Can anyone help us?

--edit--

I searched a little harder and found the sollution.

Simply remove the file main.cpp from your project (that was the first file created when we made the project, it should have been removed at that time).

Now I have other errors but I'll work them out too.
 
Last edited:
@up

Thanks rep+

compiling without any problems now ;)

but I got problem with downloading latest sources


PHP:
Command Update
Error   Server sent unexpected return value (499 Request has been forbidden by
Error   antivirus) in response to PROPFIND request for '/svnroot/forgottenserver/forgottenserver/combat.h'
Finished!
 
Can someone put the TFS Dev-Cpp in Rapidshare or something like that to me?

The link in Talaturen post is off! =/
 
I'm getting this error



and this i found at log



Fixed


New error:
Log:
Code:
obj//databasemysql.o(.text+0xfd):databasemysql.cpp: undefined reference to `mysql_init@4'
obj//databasemysql.o(.text+0x158):databasemysql.cpp: undefined reference to `mysql_options@12'
obj//databasemysql.o(.text+0x226):databasemysql.cpp: undefined reference to `mysql_real_connect@32'

obj//databasemysql.o(.text+0x238):databasemysql.cpp: undefined reference to `mysql_error@4'
obj//databasemysql.o(.text+0x319):databasemysql.cpp: undefined reference to `mysql_init@4'
obj//databasemysql.o(.text+0x374):databasemysql.cpp: undefined reference to `mysql_options@12'
obj//databasemysql.o(.text+0x442):databasemysql.cpp: undefined reference to `mysql_real_connect@32'
obj//databasemysql.o(.text+0x454):databasemysql.cpp: undefined reference to `mysql_error@4'
obj//databasemysql.o(.text+0x52b):databasemysql.cpp: undefined reference to `mysql_close@4'
obj//databasemysql.o(.text+0x5c9):databasemysql.cpp: undefined reference to `mysql_close@4'
obj//databasemysql.o(.text+0x667):databasemysql.cpp: undefined reference to `mysql_close@4'
obj//databasemysql.o(.text+0x93b):databasemysql.cpp: undefined reference to `mysql_rollback@4'
obj//databasemysql.o(.text+0x94f):databasemysql.cpp: undefined reference to `mysql_error@4'
obj//databasemysql.o(.text+0x9b3):databasemysql.cpp: undefined reference to `mysql_commit@4'
obj//databasemysql.o(.text+0x9c7):databasemysql.cpp: undefined reference to `mysql_error@4'
obj//databasemysql.o(.text+0xa4b):databasemysql.cpp: undefined reference to `mysql_real_query@12'
obj//databasemysql.o(.text+0xa5e):databasemysql.cpp: undefined reference to `mysql_error@4'
obj//databasemysql.o(.text+0xabb):databasemysql.cpp: undefined reference to `mysql_errno@4'
obj//databasemysql.o(.text+0xae8):databasemysql.cpp: undefined reference to `mysql_store_result@4'
obj//databasemysql.o(.text+0xaf7):databasemysql.cpp: undefined reference to `mysql_free_result@4'
obj//databasemysql.o(.text+0xb89):databasemysql.cpp: undefined reference to `mysql_real_query@12'
obj//databasemysql.o(.text+0xb9f):databasemysql.cpp: undefined reference to `mysql_error@4'
obj//databasemysql.o(.text+0xc02):databasemysql.cpp: undefined reference to `mysql_errno@4'
obj//databasemysql.o(.text+0xc3b):databasemysql.cpp: undefined reference to `mysql_store_result@4'
obj//databasemysql.o(.text+0xc54):databasemysql.cpp: undefined reference to `mysql_error@4'
obj//databasemysql.o(.text+0xcb7):databasemysql.cpp: undefined reference to `mysql_errno@4'
obj//databasemysql.o(.text+0xe7a):databasemysql.cpp: undefined reference to `mysql_real_escape_string@16'
obj//databasemysql.o(.text+0x14a8):databasemysql.cpp: undefined reference to `mysql_fetch_lengths@4'
obj//databasemysql.o(.text+0x1531):databasemysql.cpp: undefined reference to `mysql_fetch_row@4'
obj//databasemysql.o(.text+0x17a9):databasemysql.cpp: undefined reference to `mysql_fetch_field@4'

obj//databasemysql.o(.text+0x1aed):databasemysql.cpp: undefined reference to `mysql_fetch_field@4'
obj//databasemysql.o(.text+0x1c25):databasemysql.cpp: undefined reference to `mysql_free_result@4'
obj//databasemysql.o(.text+0x1d57):databasemysql.cpp: undefined reference to `mysql_free_result@4'
obj//databasemysql.o(.text+0x1e89):databasemysql.cpp: undefined reference to `mysql_free_result@4'

make.exe: *** [TheForgottenServer.exe] Error 1

Execution terminated

Can you give me your linkers and tell me what folder did you try to compile.(tags or trunk)

and what brings compiling?:D

More IQ than you have.It creates an executable file that does whatever the source code "tells"
 
Its a really good tutorial, I always take a look on here if I forget something :)

Nikolas.. Your great!
 
getting this error:

cannot find -lluasql_mysql
ld returned 1 exit status
C:\Users\Chris\Desktop\test\dev-cpp\Makefile.win [Build Error] [TheForgottenServer.exe] Error 1

help :eek:
 
getting this error:

cannot find -lluasql_mysql
ld returned 1 exit status
C:\Users\Chris\Desktop\test\dev-cpp\Makefile.win [Build Error] [TheForgottenServer.exe] Error 1

help :eek:

Do you use Forgotten Dev-C++? (the one that I've added a download link at the main post)
 
Somebody knows why cant i compile???
Look this error:
Code:
[Linker error] undefined reference to `boost::this_thread::interruptible_wait(void*, boost::detail::timeout)' 
  [Linker error] undefined reference to `boost::thread::start_thread()' 
 C:\Documents and Settings\Felipe\Desktop\DreamT\TAG\0.2\dev-cpp\Makefile.win [Build Error]  [TheForgottenServer.exe] Error 1 '

PLEASE, somebody help me !!! =)
 
C:\Documents and Settings\Jimmy Nyhlen\Skrivbord\Forgotten Sources\forgottenserver\trunk\house.cpp In member function `void Door::copyAttributes(Item*)':



704 C:\Documents and Settings\Jimmy Nyhlen\Skrivbord\Forgotten Sources\forgottenserver\trunk\house.cpp `copyAttributes' is not a member of `Item'


C:\Documents and Settings\Jimmy Nyhlen\Skrivbord\Forgotten Sources\forgottenserver\trunk\house.cpp In member function `virtual void Door::eek:nRemoved()':


717 C:\Documents and Settings\Jimmy Nyhlen\Skrivbord\Forgotten Sources\forgottenserver\trunk\house.cpp 'class House' has no member named 'removeDoor'


C:\Documents and Settings\Jimmy Nyhlen\Skrivbord\Forgotten Sources\Project\Makefile.win [Build Error] [../forgottenserver/trunk/house.o] Error 1


What have i done wrong? :p
 
C:\Documents and Settings\Jimmy Nyhlen\Skrivbord\Forgotten Sources\forgottenserver\trunk\house.cpp In member function `void Door::copyAttributes(Item*)':



704 C:\Documents and Settings\Jimmy Nyhlen\Skrivbord\Forgotten Sources\forgottenserver\trunk\house.cpp `copyAttributes' is not a member of `Item'


C:\Documents and Settings\Jimmy Nyhlen\Skrivbord\Forgotten Sources\forgottenserver\trunk\house.cpp In member function `virtual void Door::eek:nRemoved()':


717 C:\Documents and Settings\Jimmy Nyhlen\Skrivbord\Forgotten Sources\forgottenserver\trunk\house.cpp 'class House' has no member named 'removeDoor'


C:\Documents and Settings\Jimmy Nyhlen\Skrivbord\Forgotten Sources\Project\Makefile.win [Build Error] [../forgottenserver/trunk/house.o] Error 1


What have i done wrong? :p

Same poblem here.
 
Don't use TRUNK, it isn't compilable without some modifications from TAGS. Also its little outdated :)
 
Aff trunk is the best, who i add show healing hits, show critical animation, etc etc?
 
just wait until Elf will return :) then he'll work on TRUNK that hard, as usuall. We love him because of that! xD
 
Back
Top