Search Unity

Master Server doesn't build in Visual Studio 2008?

Discussion in 'Multiplayer' started by Kai, May 29, 2009.

  1. Kai

    Kai

    Joined:
    May 28, 2009
    Posts:
    24
    I've downloaded the master server source and have attempted to build the server. I'm not a C++ guy, but it looks like there's something off with the VS 2008 include paths. It can't find any of the standard header files (assert.h, etc).

    Anybody have an idea of how to fix it?
     
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    there are only very little things that need change / removal.

    From memory, there is an afx.... include in, replace that with windows.h
     
  3. Kai

    Kai

    Joined:
    May 28, 2009
    Posts:
    24
    Man, I still can't get this sucker to build. Has anyone compiled this guys successfully in Windows? Is there a windows binary available somewhere?
     
  4. yves

    yves

    Joined:
    Nov 10, 2008
    Posts:
    8
    I opened the MasterServer .sol in Visual C++ 2008 and after messing with includes to resolve missing "LightweightDatabaseServer.h" and more, I'm now stuck with:

    1>Linking...
    1>CommandParserInterface.obj : error LNK2019: unresolved external symbol __imp__inet_ntoa@4 referenced in function "protected: virtual void __thiscall CommandParserInterface::ReturnResult(struct SystemAddress,char const *,class TransportInterface *,struct SystemAddress)" (?ReturnResult@CommandParserInterface@@MAEXUSystemAddress@@PBDPAVTransportInterface@@0@Z)
    1>RakNetTypes.obj : error LNK2001: unresolved external symbol __imp__inet_ntoa@4
    :(
    So I'd really appreciate a binary of it to run some tests on my LAN.

    Cheers,
    -Yves
     
  5. bloodtiger10

    bloodtiger10

    Joined:
    Nov 9, 2008
    Posts:
    619
    umm two things

    1) search on google for a built version because that is how I got my version which I can't seem to find so I can't upload it.

    2) search on google for visual studio 2005.
     
  6. yves

    yves

    Joined:
    Nov 10, 2008
    Posts:
    8
    Yeah I googled for a compiled version of the master server already (that was my first move) with no luck.
    I found a Visual Studio 2003 copy and even with that version the solution wouldn't build, so I gave up and built the OSX Xcode version on a Mac as a work around since this is for testing only and it worked right away!
    :D
    -Yves
     
  7. bloodtiger10

    bloodtiger10

    Joined:
    Nov 9, 2008
    Posts:
    619
    try harder I found mine with in the first two pages of google (though I don't know what I searched for).
     
  8. yves

    yves

    Joined:
    Nov 10, 2008
    Posts:
    8
  9. hogus

    hogus

    Joined:
    Jul 9, 2009
    Posts:
    145
    Hmmm. just got it to compile in VS2008.

    Had to comment out a few lines of code, but nothing critical. Just this printf statement in TCPInterface:

    Code (csharp):
    1.  
    2. #if defined(_WIN32)  !defined(_COMPATIBILITY_1)  defined(_DEBUG)
    3.         DWORD dwIOError = GetLastError();
    4.         LPVOID messageBuffer;
    5.         FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
    6.             NULL, dwIOError, MAKELANGID( LANG_NEUTRAL, SUBLANG_DEFAULT ),  // Default language
    7.             ( LPTSTR )  messageBuffer, 0, NULL );
    8.         // something has gone wrong here...
    9.         //printf( "WSAStartup failed:Error code - %d\n%s", dwIOError, messageBuffer );
    10.         //Free the buffer.
    11.         LocalFree( messageBuffer );
    12. #endif
    13.  
    But really it's just reporting back on critical failure... so no worries, it will be good enough to test with.

    Let's see if I can attach the binary:
     

    Attached Files: