• 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!

The Forgotten Dev-Cpp v2.6!

Status
Not open for further replies.
Talaturen, rly you should update this, lots of ppl are starting to complain that they cant comple TFS
 
Ok i added all files now to this project. But still getting errors:

Code:
admin.o(.text$_ZNK5boost6system12system_error4whatEv[boost::system::system_error::what() const]+0xe4):admin.cpp: undefined reference to `boost::system::error_code::message() const'
connection.o(.text+0x1a2c):connection.cpp: undefined reference to `boost::system::error_code::new_category(int (*)(boost::system::error_code const&), std::string (*)(boost::system::error_code const&), std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > (*)(boost::system::error_code const&))'
connection.o(.text$_ZN5boost4asio6detail10socket_ops4sendEjPK7_WSABUFjiRNS_6system10error_codeE[boost::asio::detail::socket_ops::send(unsigned int, _WSABUF const*, unsigned int, int, boost::system::error_code&)]+0x57):connection.cpp: undefined reference to `WSASend@28'

connection.o(.text$_ZN5boost4asio6detail23win_iocp_socket_serviceINS0_2ip3tcpEE13async_receiveINS1_17consuming_buffersINS0_14mutable_bufferENS0_17mutable_buffers_1EEENS1_12read_handlerINS0_19basic_stream_socketIS4_NS0_21stream_socket_serviceIS4_EEEES9_NS1_14transfer_all_tENS_3_bi6bind_tIvNS_4_mfi3mf1Iv10ConnectionRKNS_6system10error_codeEEENSH_5list2INSH_5valueIPSL_EEPFNS_3argILi1EEEvEEEEEEEEEvRNS5_19implementation_typeERKT_iT0_[void boost::asio::detail::win_iocp_socket_service<boost::asio::ip::tcp>::async_receive<boost::asio::detail::consuming_buffers<boost::asio::mutable_buffer, boost::asio::mutable_buffers_1>, boost::asio::detail::read_handler<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> >, boost::asio::mutable_buffers_1, boost::asio::detail::transfer_all_t, boost::_bi::bind_t<void, boost::_mfi::mf1<void, Connection, boost::system::error_code const&>, boost::_bi::list2<boost::_bi::value<Connection*>, boost::arg<1> (*)()> > > >(boost::asio::detail::win_iocp_socket_service<boost::asio::ip::tcp>::implementation_type&, boost::asio::detail::consuming_buffers<boost::asio::mutable_buffer, boost::asio::mutable_buffers_1> const&, int, boost::asio::detail::read_handler<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> >, boost::asio::mutable_buffers_1, boost::asio::detail::transfer_all_t, boost::_bi::bind_t<void, boost::_mfi::mf1<void, Connection, boost::system::error_code const&>, boost::_bi::list2<boost::_bi::value<Connection*>, boost::arg<1> (*)()> > >)]+0x466):connection.cpp: undefined reference to `WSARecv@28'

connection.o(.text$_ZN5boost4asio6detail23win_iocp_socket_serviceINS0_2ip3tcpEE10async_sendINS1_17consuming_buffersINS0_12const_bufferENS0_17mutable_buffers_1EEENS1_13write_handlerINS0_19basic_stream_socketIS4_NS0_21stream_socket_serviceIS4_EEEES9_NS1_14transfer_all_tENS_3_bi6bind_tIvNS_4_mfi3mf2Iv10ConnectionP13OutputMessageRKNS_6system10error_codeEEENSH_5list3INSH_5valueIPSL_EENSU_ISN_EEPFNS_3argILi1EEEvEEEEEEEEEvRNS5_19implementation_typeERKT_iT0_[void boost::asio::detail::win_iocp_socket_service<boost::asio::ip::tcp>::async_send<boost::asio::detail::consuming_buffers<boost::asio::const_buffer, boost::asio::mutable_buffers_1>, boost::asio::detail::write_handler<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> >, boost::asio::mutable_buffers_1, boost::asio::detail::transfer_all_t, boost::_bi::bind_t<void, boost::_mfi::mf2<void, Connection, OutputMessage*, boost::system::error_code const&>, boost::_bi::list3<boost::_bi::value<Connection*>, boost::_bi::value<OutputMessage*>, boost::arg<1> (*)()> > > >(boost::asio::detail::win_iocp_socket_service<boost::asio::ip::tcp>::implementation_type&, boost::asio::detail::consuming_buffers<boost::asio::const_buffer, boost::asio::mutable_buffers_1> const&, int, boost::asio::detail::write_handler<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> >, boost::asio::mutable_buffers_1, boost::asio::detail::transfer_all_t, boost::_bi::bind_t<void, boost::_mfi::mf2<void, Connection, OutputMessage*, boost::system::error_code const&>, boost::_bi::list3<boost::_bi::value<Connection*>, boost::_bi::value<OutputMessage*>, boost::arg<1> (*)()> > >)]+0x45a):connection.cpp: undefined reference to `WSASend@28'
server.o(.text+0xdcc):server.cpp: undefined reference to `boost::system::error_code::new_category(int (*)(boost::system::error_code const&), std::string (*)(boost::system::error_code const&), std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > (*)(boost::system::error_code const&))'

server.o(.text$_ZN5boost4asio6detail10socket_ops6socketEiiiRNS_6system10error_codeE[boost::asio::detail::socket_ops::socket(int, int, int, boost::system::error_code&)]+0x3e):server.cpp: undefined reference to `WSASocketA@24'
collect2: ld returned 1 exit status
make.exe: *** [TheForgottenServer.exe] Error 1

Can someone post here his working .dev project file?

@Edit
Ok i searched, and now fixed. Now i have just only 5 errors with WSASend:

Code:
  [Linker error] undefined reference to `WSASend@28' 
  [Linker error] undefined reference to `WSARecv@28' 
  [Linker error] undefined reference to `WSASend@28' 
  [Linker error] undefined reference to `WSASocketA@24' 
  ld returned 1 exit status[/QUOTE]

Add:
-lws2_32
to Linkers.
 
Building Makefile: "D:\Otski\Ildeadfishl\Project\Makefile.win"
Executing make...
make.exe -f "D:\Otski\Ildeadfishl\Project\Makefile.win" all
g++.exe -c ../Source/account.cpp -o ../Source/account.o -I"lib/gcc/mingw32/3.4.2/include" -I"include/c++/3.4.2/backward" -I"include/c++/3.4.2/mingw32" -I"include/c++/3.4.2" -I"include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__RULEVIOLATIONREPORTS__

g++.exe -c ../Source/actions.cpp -o ../Source/actions.o -I"lib/gcc/mingw32/3.4.2/include" -I"include/c++/3.4.2/backward" -I"include/c++/3.4.2/mingw32" -I"include/c++/3.4.2" -I"include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__RULEVIOLATIONREPORTS__

g++.exe -c ../Source/admin.cpp -o ../Source/admin.o -I"lib/gcc/mingw32/3.4.2/include" -I"include/c++/3.4.2/backward" -I"include/c++/3.4.2/mingw32" -I"include/c++/3.4.2" -I"include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__RULEVIOLATIONREPORTS__

In file included from ../Source/admin.cpp:24:
../Source/connection.h:25:26: boost/asio.hpp: No such file or directory
In file included from ../Source/admin.cpp:24:
../Source/connection.h:59: error: `boost::asio' has not been declared
../Source/connection.h:59: error: expected `;' before '(' token

../Source/connection.h:84: error: `boost::asio' has not been declared
../Source/connection.h:84: error: expected `)' before '&' token
../Source/connection.h:104: error: `boost::asio' has not been declared

../Source/connection.h:104: error: ISO C++ forbids declaration of `socket' with no type
../Source/connection.h:104: error: expected `;' before '&' token
../Source/connection.h:106: error: expected `;' before "void"
../Source/connection.h:114: error: `boost::system' has not been declared
../Source/connection.h:114: error: expected `,' or `...' before '&' token
../Source/connection.h:114: error: ISO C++ forbids declaration of `error_code' with no type
../Source/connection.h:115: error: `boost::system' has not been declared
../Source/connection.h:115: error: expected `,' or `...' before '&' token
../Source/connection.h:115: error: ISO C++ forbids declaration of `error_code' with no type
../Source/connection.h:117: error: `boost::system' has not been declared
../Source/connection.h:117: error: expected `,' or `...' before '&' token
../Source/connection.h:117: error: ISO C++ forbids declaration of `error_code' with no type

../Source/connection.h:119: error: `boost::system' has not been declared
../Source/connection.h:119: error: expected `,' or `...' before '&' token
../Source/connection.h:119: error: ISO C++ forbids declaration of `error_code' with no type

../Source/connection.h:120: error: `boost::system' has not been declared
../Source/connection.h:120: error: expected `,' or `...' before '&' token
../Source/connection.h:120: error: ISO C++ forbids declaration of `error_code' with no type
../Source/connection.h:129: error: `boost::asio' has not been declared
../Source/connection.h:129: error: ISO C++ forbids declaration of `socket' with no type
../Source/connection.h:129: error: expected `;' before "m_socket"

make.exe: *** [../Source/admin.o] Error 1

Execution terminated

mmm...? :p
 
Updated to 1.3, sorry for the delay, but I was waiting until v0.3.8 of asio would be released as stable version (not release candidates).
 
So all my debugs occured bcoz of missing that asio which u included now, ye?

That means now I'll compile without errors? ;D
 
../Source/admin.o(.text+0x4519):admin.cpp: undefined reference to `boost::system::get_system_category()'
../Source/admin.o(.text+0x4532):admin.cpp: undefined reference to `boost::system::get_posix_category()'
../Source/admin.o(.text+0x454b):admin.cpp: undefined reference to `boost::system::get_posix_category()'
../Source/admin.o(.text+0x4564):admin.cpp: undefined reference to `boost::system::get_system_category()'
../Source/connection.o(.text+0x1762):connection.cpp: undefined reference to `boost::system::get_system_category()'
../Source/connection.o(.text+0x177b):connection.cpp: undefined reference to `boost::system::get_posix_category()'
../Source/connection.o(.text+0x1794):connection.cpp: undefined reference to `boost::system::get_posix_category()'
../Source/connection.o(.text+0x17ad):connection.cpp: undefined reference to `boost::system::get_system_category()'
../Source/game.o(.text+0x173ef):game.cpp: undefined reference to `boost::system::get_system_category()'
../Source/game.o(.text+0x17408):game.cpp: undefined reference to `boost::system::get_posix_category()'
../Source/game.o(.text+0x17421):game.cpp: undefined reference to `boost::system::get_posix_category()'
../Source/game.o(.text+0x1743a):game.cpp: undefined reference to `boost::system::get_system_category()'

../Source/otserv.o(.text+0x39de):eek:tserv.cpp: undefined reference to `boost::system::get_system_category()'
../Source/otserv.o(.text+0x39fe):eek:tserv.cpp: undefined reference to `boost::system::get_posix_category()'
../Source/otserv.o(.text+0x3a1e):eek:tserv.cpp: undefined reference to `boost::system::get_posix_category()'
../Source/otserv.o(.text+0x3a3e):eek:tserv.cpp: undefined reference to `boost::system::get_system_category()'
../Source/outputmessage.o(.text+0x11f1):eek:utputmessage.cpp: undefined reference to `boost::system::get_system_category()'
../Source/outputmessage.o(.text+0x120a):eek:utputmessage.cpp: undefined reference to `boost::system::get_posix_category()'
../Source/outputmessage.o(.text+0x1223):eek:utputmessage.cpp: undefined reference to `boost::system::get_posix_category()'
../Source/outputmessage.o(.text+0x123c):eek:utputmessage.cpp: undefined reference to `boost::system::get_system_category()'
../Source/protocol.o(.text+0x6d1):protocol.cpp: undefined reference to `boost::system::get_system_category()'
../Source/protocol.o(.text+0x6ea):protocol.cpp: undefined reference to `boost::system::get_posix_category()'
../Source/protocol.o(.text+0x703):protocol.cpp: undefined reference to `boost::system::get_posix_category()'
../Source/protocol.o(.text+0x71c):protocol.cpp: undefined reference to `boost::system::get_system_category()'
../Source/protocol80.o(.text+0xcddd):protocol80.cpp: undefined reference to `boost::system::get_system_category()'
../Source/protocol80.o(.text+0xcdf6):protocol80.cpp: undefined reference to `boost::system::get_posix_category()'
../Source/protocol80.o(.text+0xce0f):protocol80.cpp: undefined reference to `boost::system::get_posix_category()'
../Source/protocol80.o(.text+0xce28):protocol80.cpp: undefined reference to `boost::system::get_system_category()'
../Source/protocollogin.o(.text+0xc19):protocollogin.cpp: undefined reference to `boost::system::get_system_category()'
../Source/protocollogin.o(.text+0xc32):protocollogin.cpp: undefined reference to `boost::system::get_posix_category()'
../Source/protocollogin.o(.text+0xc4b):protocollogin.cpp: undefined reference to `boost::system::get_posix_category()'
../Source/protocollogin.o(.text+0xc64):protocollogin.cpp: undefined reference to `boost::system::get_system_category()'
../Source/server.o(.text+0x8d2):server.cpp: undefined reference to `boost::system::get_system_category()'
../Source/server.o(.text+0x8eb):server.cpp: undefined reference to `boost::system::get_posix_category()'
../Source/server.o(.text+0x904):server.cpp: undefined reference to `boost::system::get_posix_category()'
../Source/server.o(.text+0x91d):server.cpp: undefined reference to `boost::system::get_system_category()'
../Source/status.o(.text+0xfb7):status.cpp: undefined reference to `_imp__xmlFree'
../Source/status.o(.text+0x13ed):status.cpp: undefined reference to `boost::system::get_system_category()'
../Source/status.o(.text+0x1406):status.cpp: undefined reference to `boost::system::get_posix_category()'
../Source/status.o(.text+0x141f):status.cpp: undefined reference to `boost::system::get_posix_category()'
../Source/status.o(.text+0x1438):status.cpp: undefined reference to `boost::system::get_system_category()'
../Source/teleport.o(.text+0x843):teleport.cpp: undefined reference to `_imp__xmlFree'
../Source/teleport.o(.text+0x880):teleport.cpp: undefined reference to `_imp__xmlFree'
../Source/teleport.o(.text+0x8bd):teleport.cpp: undefined reference to `_imp__xmlFree'
../Source/tools.o(.text+0x97f):tools.cpp: undefined reference to `_imp__xmlFree'
../Source/tools.o(.text+0x9d6):tools.cpp: undefined reference to `_imp__xmlFree'
../Source/tools.o(.text+0xa33):tools.cpp: more undefined references to `_imp__xmlFree' follow
../Source/tools.o(.text+0x3b84):tools.cpp: undefined reference to `boost::system::get_system_category()'
../Source/tools.o(.text+0x3b9d):tools.cpp: undefined reference to `boost::system::get_posix_category()'
../Source/tools.o(.text+0x3bb6):tools.cpp: undefined reference to `boost::system::get_posix_category()'
../Source/tools.o(.text+0x3bcf):tools.cpp: undefined reference to `boost::system::get_system_category()'

cool...

what to do now? ;p
 
Compiler: Default compiler
Building Makefile: "C:\forgottenserver\Makefile.win"
Executing make...
make.exe -f "C:\forgottenserver\Makefile.win" all
g++.exe -c account.cpp -o account.o -I"lib/gcc/mingw32/3.4.2/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__SERVER_PROTECTION__

In file included from account.h:26,
from account.cpp:22:
definitions.h:93:1: warning: "_WIN32_WINNT" redefined
definitions.h:80:1: warning: this is the location of the previous definition
In file included from account.h:26,
from account.cpp:22:
definitions.h: In function `int strcasecmp(const char*, const char*)':
definitions.h:109: error: `::_strcmp' has not been declared
definitions.h: At global scope:
definitions.h:112: error: `size_t' has not been declared
definitions.h:113: error: ISO C++ forbids declaration of `n' with no type
definitions.h: In function `int strncasecmp(const char*, const char*, int)':
definitions.h:114: error: `::_strnicmp' has not been declared

In file included from account.cpp:22:
account.h: At global scope:
account.h:38: error: using-declaration for non-member at class scope
account.h:38: error: expected `;' before "recoveryKey"
account.h:39: error: using-declaration for non-member at class scope
account.h:39: error: expected `;' before '<' token

account.cpp: In destructor `Account::~Account()':
account.cpp:31: error: `charList' undeclared (first use this function)
account.cpp:31: error: (Each undeclared identifier is reported only once for each function it appears in.)

make.exe: *** [account.o] Error 1

Execution terminated

what about this?
 
Last edited:
Talaturen: Maybe you should add the linkers and stuff to compile it too?
 
Maybe you should just start the .dev file with Dev-Cpp?
 
u can post all linkers and c++ things needed to compile latest sources?
 
Downloaded Dev-Cpp (yours), opened the project (the sources included in your post).
Didnt work.
Btw, please update to the newest revision.

Error:
aaaalr8.png
 
Downloaded Dev-Cpp (yours), opened the project (the sources included in your post).
Didnt work.
Btw, please update to the newest revision.

Error:
aaaalr8.png

Are you sure that you're using 1.3 and not an older version?
 
100%. I just downloaded it, opened the downloaded source included in your post and clicked "Rebuild All", and this error appeared at the end of the compilation.
I am going to re-do it, somehow it might work.

(Can you please update to newest rev too?) ;)
 
This is what the compile log says:
Code:
Compiler: Default compiler
Building Makefile: "C:\Documents and Settings\Johannes\Skrivbord\forgottenserver\Makefile.win"
Executing  make...
make.exe -f "C:\Documents and Settings\Johannes\Skrivbord\forgottenserver\Makefile.win" all
windres.exe -i TheForgottenServer_private.rc --input-format=rc -o TheForgottenServer_private.res -O coff 

g++.exe account.o actions.o admin.o allocator.o ban.o baseevents.o chat.o combat.o commands.o condition.o configmanager.o connection.o container.o creature.o creatureevent.o cylinder.o database.o databasemysql.o databasesqlite.o depot.o exception.o fileloader.o game.o gui.o house.o housetile.o inputbox.o ioguild.o iologindata.o iomap.o iomapserialize.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 protocol80.o protocol.o protocollogin.o quests.o raids.o rsa.o scheduler.o scriptmanager.o server.o spawn.o spells.o status.o talkaction.o tasks.o teleport.o textlogger.o thing.o tile.o tools.o trashholder.o waitlist.o weapons.o vocation.o TheForgottenServer_private.res -o "TheForgottenServer.exe" -L"lib" -mwindows -O1 -lboost_system -lgmp -lluasql-mysql -lluasql-sqlite3 -llua5.1 -lmysql -lregex -lsqlite3 -lwsock32 -lxml2 -lmysql -lws2_32 -s  

C:\Dev-Cpp\Bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot find -lboost_system
collect2: ld returned 1 exit status

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

Execution terminated
 
Check C:\Dev-Cpp\lib\ if libboost_system.a is there.
 
Then it should work..

Try to change -lboost_system to C:/Dev-Cpp/lib/libboost_system.a
 
My Dev-Cpp is on the desktop. Maybe thats the problem? I will try to place it directly in :C
 
It Works Now When I Moved Both Source And Dev-cpp To :c ;dd
But please, update to newest Revision.
 
Last edited:
Status
Not open for further replies.
Back
Top