- Joined
- Jul 7, 2007
- Messages
- 4,049
- Reaction score
- 239
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
../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)tserv.cpp: undefined reference to `boost::system::get_system_category()'
../Source/otserv.o(.text+0x39fe)tserv.cpp: undefined reference to `boost::system::get_posix_category()'
../Source/otserv.o(.text+0x3a1e)tserv.cpp: undefined reference to `boost::system::get_posix_category()'
../Source/otserv.o(.text+0x3a3e)tserv.cpp: undefined reference to `boost::system::get_system_category()'
../Source/outputmessage.o(.text+0x11f1)utputmessage.cpp: undefined reference to `boost::system::get_system_category()'
../Source/outputmessage.o(.text+0x120a)utputmessage.cpp: undefined reference to `boost::system::get_posix_category()'
../Source/outputmessage.o(.text+0x1223)utputmessage.cpp: undefined reference to `boost::system::get_posix_category()'
../Source/outputmessage.o(.text+0x123c)utputmessage.cpp: undefined reference to `boost::system::get_system_category()'
../Source/protocol.o(.text+0x6d1)rotocol.cpp: undefined reference to `boost::system::get_system_category()'
../Source/protocol.o(.text+0x6ea)rotocol.cpp: undefined reference to `boost::system::get_posix_category()'
../Source/protocol.o(.text+0x703)rotocol.cpp: undefined reference to `boost::system::get_posix_category()'
../Source/protocol.o(.text+0x71c)rotocol.cpp: undefined reference to `boost::system::get_system_category()'
../Source/protocol80.o(.text+0xcddd)rotocol80.cpp: undefined reference to `boost::system::get_system_category()'
../Source/protocol80.o(.text+0xcdf6)rotocol80.cpp: undefined reference to `boost::system::get_posix_category()'
../Source/protocol80.o(.text+0xce0f)rotocol80.cpp: undefined reference to `boost::system::get_posix_category()'
../Source/protocol80.o(.text+0xce28)rotocol80.cpp: undefined reference to `boost::system::get_system_category()'
../Source/protocollogin.o(.text+0xc19)rotocollogin.cpp: undefined reference to `boost::system::get_system_category()'
../Source/protocollogin.o(.text+0xc32)rotocollogin.cpp: undefined reference to `boost::system::get_posix_category()'
../Source/protocollogin.o(.text+0xc4b)rotocollogin.cpp: undefined reference to `boost::system::get_posix_category()'
../Source/protocollogin.o(.text+0xc64)rotocollogin.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()'
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
Maybe you should just start the .dev file with Dev-Cpp?
Downloaded Dev-Cpp (yours), opened the project (the sources included in your post).
Didnt work.
Btw, please update to the newest revision.
Error:
![]()
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