windows build

Anything related to programming on the game

Re: windows build

Postby Andrew » Sun Dec 20, 2009 6:03 pm

I made a lot of commits to the cmake system which should help you get a little further along with building the game. I also updated the documentation too.

I haven't been able to produce a built copy yet. There's two problems I'm having. The first is how to correctly deal with gettext on windows. The second problem is it can't find boost. The second problem is probably just a missing include path but the first one is a bit more tricky.

Edit: Fixed this in trunk
User avatar
Andrew
Site Admin
 
Posts: 149
Joined: Fri Oct 23, 2009 6:01 pm
Location: Thailand

Re: windows build

Postby Webmug » Sun Dec 20, 2009 6:48 pm

Great!

I'm currently updating some more problems:

Changed every libintl.h -> using gettext.h now
ERROR unknown var GAME_SETTINGS_FILE -> changed to "settings.cfg" (gamecore.cpp)
error finding "boost/thread.hpp" -> changed to "boost/thread/thread.hpp"
error finding "bind/bind.hpp" -> changed to "bind/bind.hpp"
sleep not found (Client.cpp) -> added #include winbase


The following errors are more difficult...
Error 8732 error C2039: 'getNumberOfDevices' : is not a member of 'OIS::InputManager' c:\hardwar\code\client\core\src\inputmanager.cpp 100 hardwar
Error 2141 error C2039: 'getNumberOfDevices' : is not a member of 'OIS::InputManager' c:\hardwar\code\client\core\src\inputmanager.cpp
Error 4167 fatal error C1083: Cannot open source file: 'C:/hardwar/bin/code/shared/include/config.h)': No such file or directory
Last edited by Webmug on Sun Dec 20, 2009 7:18 pm, edited 1 time in total.
Webmug
 
Posts: 21
Joined: Sun Dec 13, 2009 5:53 pm

Re: windows build

Postby Andrew » Sun Dec 20, 2009 6:55 pm

Some of these errors should be fixed if you pull the latest version and rerun cmake.

The missing Boost thread include and game settings define is fixed. That I know for sure.

I know what the OIS issue is. That's because you have the old version.
User avatar
Andrew
Site Admin
 
Posts: 149
Joined: Fri Oct 23, 2009 6:01 pm
Location: Thailand

Re: windows build

Postby Webmug » Sun Dec 20, 2009 7:26 pm

Interesting, CMake problems are gone with your new changes :D

Currently the following problems with gettext (i don't have the libintl.h, using gettext.h instead):
-> added missing path: C:\gettext-0.17\gettext-tools\gnulib-lib

Error 56 fatal error C1083: Cannot open include file: 'MyGUI_Prerequest.h': No such file or directory c:\hardwar_20-12-2009_2004\code\client\console\include\consolecombo.h 22 client
-> added missing path: C:\MyGUI2.2.2_source\MyGUIEngine\include

sleep not found (Client.cpp)

Error 2 fatal error C1083: Cannot open include file: 'boost/thread.hpp': No such file or directory c:\hardwar_20-12-2009_2004\code\server\include\client.h 23 server
-> changed boost/thread/thread.hpp
-> changed boost/bind/bind.hpp

-> added missing path: C:\Program Files\boost\boost_1_40\lib
Webmug
 
Posts: 21
Joined: Sun Dec 13, 2009 5:53 pm

Re: windows build

Postby Andrew » Mon Dec 21, 2009 3:03 pm

I fixed the gettext errors. Here's how you do it. Download gettext from here and then put it in the folder "dependencies/gettext"

After doing this pull the latest version and rerun cmake. It will then get rid of the errors on windows.

I already updated the windows documentation. :D

Edit: I also fixed the OIS errors too.
User avatar
Andrew
Site Admin
 
Posts: 149
Joined: Fri Oct 23, 2009 6:01 pm
Location: Thailand

Re: windows build

Postby Webmug » Tue Dec 22, 2009 11:01 am

Thanks for the update,

Currently there are only some compatibility problems, see the list below of my current build errors:

Code: Select all
Error   24   error C3861: 'sleep': identifier not found   c:\hardwar_22-12-2009_1142\hardwar\code\server\src\client.cpp   104   server
Error   25   error C3861: 'sleep': identifier not found   c:\hardwar_22-12-2009_1142\hardwar\code\server\src\client.cpp   277   server
Error   51   fatal error C1075: end of file found before the left brace '{' at 'c:\hardwar_22-12-2009_1142\hardwar\code\client\core\src\main.cpp(37)' was matched   c:\hardwar_22-12-2009_1142\hardwar\code\client\core\src\main.cpp   73   client
Error   55   error C2011: 'sockaddr' : 'struct' type redefinition   c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h   206   client
Error   56   error C2143: syntax error : missing '}' before 'constant'   c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h   384   client
Error   57   error C2143: syntax error : missing ';' before 'constant'   c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h   384   client
Error   58   error C2059: syntax error : 'constant'   c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h   384   client
Error   59   error C2143: syntax error : missing ';' before '}'   c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h   437   client
Error   60   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h   437   client
Error   61   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h   437   client
Error   67   error C2011: 'sockaddr_in' : 'struct' type redefinition   c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h   577   client
Error   68   error C2011: 'fd_set' : 'struct' type redefinition   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   132   client
Error   70   error C2011: 'timeval' : 'struct' type redefinition   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   176   client
Error   71   error C2011: 'hostent' : 'struct' type redefinition   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   232   client
Error   72   error C2011: 'netent' : 'struct' type redefinition   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   245   client
Error   73   error C2011: 'servent' : 'struct' type redefinition   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   252   client
Error   74   error C2011: 'protoent' : 'struct' type redefinition   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   264   client
Error   75   error C2011: 'WSAData' : 'struct' type redefinition   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   360   client
Error   76   error C2011: 'sockproto' : 'struct' type redefinition   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   458   client
Error   77   error C2011: 'linger' : 'struct' type redefinition   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   500   client
Error   85   error C2375: 'accept' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   1527   client
Error   86   error C2375: 'bind' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   1548   client
Error   87   error C2375: 'closesocket' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   1567   client
Error   88   error C2375: 'connect' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   1586   client
Error   89   error C2375: 'ioctlsocket' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   1607   client
Error   90   error C2375: 'getpeername' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   1628   client
Error   91   error C2375: 'getsockname' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   1649   client
Error   92   error C2375: 'getsockopt' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   1672   client
Error   93   error C2375: 'htonl' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   1693   client
Error   94   error C2375: 'htons' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   1710   client
Error   95   error C2375: 'inet_addr' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   1728   client
Error   96   error C2375: 'inet_ntoa' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   1745   client
Error   97   error C2375: 'listen' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   1763   client
Error   98   error C2375: 'ntohl' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   1781   client
Error   99   error C2375: 'ntohs' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   1798   client
Error   100   error C2375: 'recv' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   1818   client
Error   101   error C2375: 'recvfrom' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   1843   client
Error   102   error C2375: 'select' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   1869   client
Error   103   error C2375: 'send' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   1893   client
Error   104   error C2375: 'sendto' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   1918   client
Error   105   error C2375: 'setsockopt' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   1944   client
Error   106   error C2375: 'shutdown' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   1966   client
Error   107   error C2375: 'socket' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   1986   client
Error   108   error C2375: 'gethostbyaddr' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   2009   client
Error   109   error C2375: 'gethostbyname' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   2029   client
Error   110   error C2375: 'gethostname' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   2047   client
Error   111   error C2375: 'getservbyport' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   2067   client
Error   112   error C2375: 'getservbyname' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   2087   client
Error   113   error C2375: 'getprotobynumber' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   2106   client
Error   114   error C2375: 'getprotobyname' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   2124   client
Error   115   error C2375: 'WSAStartup' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   2145   client
Error   116   error C2375: 'WSACleanup' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   2163   client
Error   117   error C2375: 'WSASetLastError' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   2180   client
Error   118   error C2375: 'WSAGetLastError' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   2197   client
Error   119   error C2375: 'WSAIsBlocking' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   2214   client
Error   120   error C2375: 'WSAUnhookBlockingHook' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   2231   client
Error   121   error C2375: 'WSASetBlockingHook' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   2248   client
Error   122   error C2375: 'WSACancelBlockingCall' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   2265   client
Error   123   error C2375: 'WSAAsyncGetServByName' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   2287   client
Error   124   error C2375: 'WSAAsyncGetServByPort' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   2314   client
Error   125   error C2375: 'WSAAsyncGetProtoByName' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   2340   client
Error   126   error C2375: 'WSAAsyncGetProtoByNumber' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   2365   client
Error   127   error C2375: 'WSAAsyncGetHostByName' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   2390   client
Error   128   error C2375: 'WSAAsyncGetHostByAddr' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   2417   client
Error   129   error C2375: 'WSACancelAsyncRequest' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   2440   client
Error   130   error C2375: 'WSAAsyncSelect' : redefinition; different linkage   c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h   2461   client
Error   131   error C2059: syntax error : '}'   c:\hardwar_22-12-2009_1142\hardwar\dependencies\enet\include\enet\enet.h   488   client
Error   132   error C2143: syntax error : missing ';' before '}'   c:\hardwar_22-12-2009_1142\hardwar\dependencies\enet\include\enet\enet.h   488   client
Error   133   error C2059: syntax error : '}'   c:\hardwar_22-12-2009_1142\hardwar\dependencies\enet\include\enet\enet.h   488   client
Error   134   error C2143: syntax error : missing ';' before '{'   c:\ogresdk\include\ogreplatform.h   34   client
Error   135   error C2447: '{' : missing function header (old-style formal list?)   c:\ogresdk\include\ogreplatform.h   34   client
Error   136   error C2146: syntax error : missing ';' before identifier 'RGBA'   c:\ogresdk\include\ogrecolourvalue.h   36   client
Error   137   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\ogresdk\include\ogrecolourvalue.h   36   client
Error   138   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\ogresdk\include\ogrecolourvalue.h   36   client
Error   139   error C2146: syntax error : missing ';' before identifier 'getAsRGBA'   c:\ogresdk\include\ogrecolourvalue.h   75   client
Error   140   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\ogresdk\include\ogrecolourvalue.h   75   client
Error   141   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\ogresdk\include\ogrecolourvalue.h   75   client
Error   143   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\ogresdk\include\ogrecolourvalue.h   90   client
Error   144   error C2146: syntax error : missing ',' before identifier 'val'   c:\ogresdk\include\ogrecolourvalue.h   90   client
Error   145   error C2061: syntax error : identifier 'RGBA'   c:\ogresdk\include\ogrehardwarevertexbuffer.h   237   client
Error   146   error C2065: 'pElem' : undeclared identifier   c:\ogresdk\include\ogrehardwarevertexbuffer.h   239   client
Error   147   error C2061: syntax error : identifier 'RGBA'   c:\ogresdk\include\ogrehardwarevertexbuffer.h   239   client
Error   148   error C2065: 'uint8' : undeclared identifier   c:\ogresdk\include\ogrerenderqueue.h   89   client
Error   149   error C3203: 'map' : unspecialized class template can't be used as a template argument for template parameter 'T', expected a real type   c:\ogresdk\include\ogrerenderqueue.h   91   client
Error   150   error C2955: 'std::map' : use of class template requires template argument list   c:\ogresdk\include\ogrerenderqueue.h   91   client
Error   151   error C2061: syntax error : identifier 'uint8'   c:\ogresdk\include\ogrerenderqueue.h   122   client
Error   152   error C2146: syntax error : missing ';' before identifier 'mDefaultQueueGroup'   c:\ogresdk\include\ogrerenderqueue.h   128   client
Error   153   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\ogresdk\include\ogrerenderqueue.h   128   client
Error   154   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\ogresdk\include\ogrerenderqueue.h   128   client
Error   155   error C2061: syntax error : identifier 'uint8'   c:\ogresdk\include\ogrerenderqueue.h   152   client
Error   156   error C2061: syntax error : identifier 'uint8'   c:\ogresdk\include\ogrerenderqueue.h   176   client
Error   157   error C2061: syntax error : identifier 'uint8'   c:\ogresdk\include\ogrerenderqueue.h   195   client
Error   158   error C2535: 'void Ogre::RenderQueue::addRenderable(Ogre::Renderable *)' : member function already defined or declared   c:\ogresdk\include\ogrerenderqueue.h   195   client
Error   159   error C2535: 'void Ogre::RenderQueue::addRenderable(Ogre::Renderable *)' : member function already defined or declared   c:\ogresdk\include\ogrerenderqueue.h   209   client
Error   160   error C2146: syntax error : missing ';' before identifier 'getDefaultQueueGroup'   c:\ogresdk\include\ogrerenderqueue.h   214   client
Error   161   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\ogresdk\include\ogrerenderqueue.h   214   client
Error   162   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\ogresdk\include\ogrerenderqueue.h   214   client
Error   164   error C2061: syntax error : identifier 'uint8'   c:\ogresdk\include\ogrerenderqueue.h   230   client
Error   165   error C2061: syntax error : identifier 'uint16'   c:\ogresdk\include\ogreserializer.h   71   client
Error   166   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\ogresdk\include\ogreserializer.h   75   client
Error   167   error C2143: syntax error : missing ',' before '*'   c:\ogresdk\include\ogreserializer.h   75   client
Error   168   error C2061: syntax error : identifier 'uint16'   c:\ogresdk\include\ogreserializer.h   90   client
Error   169   error C2146: syntax error : missing ';' before identifier 'mRenderQueueID'   c:\ogresdk\include\ogremovableobject.h   124   client
Error   170   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\ogresdk\include\ogremovableobject.h   124   client
Error   171   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\ogresdk\include\ogremovableobject.h   124   client
Error   172   error C2061: syntax error : identifier 'uint8'   c:\ogresdk\include\ogremovableobject.h   327   client
Error   173   error C2146: syntax error : missing ';' before identifier 'getRenderQueueGroup'   c:\ogresdk\include\ogremovableobject.h   330   client
Error   174   error C2433: 'Ogre::MovableObject::uint8' : 'virtual' not permitted on data declarations   c:\ogresdk\include\ogremovableobject.h   330   client
Error   175   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\ogresdk\include\ogremovableobject.h   330   client
Error   176   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\ogresdk\include\ogremovableobject.h   330   client
Error   178   error C2061: syntax error : identifier 'uint16'   c:\ogresdk\include\ogrebillboardset.h   757   client
Error   179   error C2061: syntax error : identifier 'uint16'   c:\ogresdk\include\ogrebillboardset.h   780   client
Error   180   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\ogresdk\include\ogrepixelformat.h   420   client
Error   181   error C2146: syntax error : missing ',' before identifier 'r'   c:\ogresdk\include\ogrepixelformat.h   420   client
Error   182   error C2061: syntax error : identifier 'uint8'   c:\ogresdk\include\ogrepixelformat.h   444   client
Error   183   error C2061: syntax error : identifier 'uint8'   c:\ogresdk\include\ogreentity.h   359   client
Error   184   error C2146: syntax error : missing ';' before identifier 'code_point'   c:\ogresdk\include\ogreutfstring.h   186   client
Error   185   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\ogresdk\include\ogreutfstring.h   186   client
Error   186   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\ogresdk\include\ogreutfstring.h   186   client
Error   187   error C2146: syntax error : missing ';' before identifier 'value_type'   c:\ogresdk\include\ogreutfstring.h   189   client
Error   188   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\ogresdk\include\ogreutfstring.h   189   client
Error   189   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\ogresdk\include\ogreutfstring.h   189   client
Error   190   error C2065: 'value_type' : undeclared identifier   c:\ogresdk\include\ogreutfstring.h   207   client
Error   191   error C2955: 'std::iterator' : use of class template requires template argument list   c:\ogresdk\include\ogreutfstring.h   207   client
Error   192   error C2535: 'void Ogre::UTFString::push_back(Ogre::UTFString::unicode_char)' : member function already defined or declared   c:\ogresdk\include\ogreutfstring.h   961   client
Error   193   fatal error C1003: error count exceeds 100; stopping compilation   c:\ogresdk\include\ogreutfstring.h   961   client
Webmug
 
Posts: 21
Joined: Sun Dec 13, 2009 5:53 pm

Re: windows build

Postby Andrew » Mon Dec 28, 2009 4:47 am

I fixed another issue with the Boost errors (I'm not sure if you were receiving this one) where it seems you also need to install boost date_time as well. I updated the documentation again to reflect the change.

For the "sleep" error you can simply change the function name to "Sleep". I think sleep is probably not the best function to use here anyway so I am going to have to review that at some point.

As for the redefinition errors you are receiving, i'm not getting those. Where I am currently stuck is with the "MyGUI_Prerequest.h" error that you are also getting. I do not quite understand what the problem is because my path already includes the folder with the mygui headers in it.

I think I am also getting linker errors on the gettext library however I'm not at my computer to check right now.
User avatar
Andrew
Site Admin
 
Posts: 149
Joined: Fri Oct 23, 2009 6:01 pm
Location: Thailand

Re: windows build

Postby Webmug » Thu Feb 18, 2010 11:36 am

Hi!

I'm currently trying to build the sources on windows2k3 with VS2008.
I have seen that the newest mygui (3.0.1) doesn't work, using 2.2.3 works.

(1)
I also have those link errors with gettext, prob need to compile the gettext libraries for VS2008.
error LNK2001: unresolved external symbol _gettext
Fixed this by adding libintl.lib to linker dependencies.

(2)
error LNK2019: unresolved external symbol __imp__enet_packet_destroy referenced in function "private: void __thiscall Server::Client::processConnecting(void)" (?processConnecting@Client@Server@@AAEXXZ) Client.obj server

(3)
error LNK2001: unresolved external symbol __imp__enet_peer_send ClientManager.obj server


also I started reading the book "Pro OGRE 3D Programming"
Webmug
 
Posts: 21
Joined: Sun Dec 13, 2009 5:53 pm

Re: windows build

Postby Andrew » Thu Feb 18, 2010 5:32 pm

You need to link to the enet library. Ideally it should be done automatically by cmake however that seems to be a bug.

You could try adding it yourself in the IDE. It should be built in the libs directory.
User avatar
Andrew
Site Admin
 
Posts: 149
Joined: Fri Oct 23, 2009 6:01 pm
Location: Thailand

Re: windows build

Postby Webmug » Fri Feb 19, 2010 11:14 am

I guess in the code below from win32.h is something not correctly used.
ENET_DLL is set
ENET_BUILDING_LIB is not.
Don't know where to set these options in VS...

Code: Select all
#if defined ENET_DLL
#if defined ENET_BUILDING_LIB
#define ENET_API __declspec( dllexport )
#else
#define ENET_API __declspec( dllimport )
#endif /* ENET_BUILDING_LIB */
#else /* !ENET_DLL */
#define ENET_API extern
#endif /* ENET_DLL */


If I use
Code: Select all
#define ENET_API __declspec( dllexport )
it's finding the functions in my previouse post but now complaning about:

error LNK2019: unresolved external symbol __imp__htonl@4 referenced in function _enet_crc32 Enet_HardwarServer.lib server
error LNK2001: unresolved external symbol __imp__htonl@4 Enet_HardwarServer.lib server

Maybe you can point me to the right direction, this is still a little hard for me to grasp... when building applications in C# or Delphi I never had these problems...
Webmug
 
Posts: 21
Joined: Sun Dec 13, 2009 5:53 pm

PreviousNext

Return to Code

Who is online

Users browsing this forum: No registered users and 1 guest

cron