Search Unity

MasterServer would not compile under Visual C++ 2008 Express

Discussion in 'Multiplayer' started by seventhsynergy, Apr 22, 2009.

  1. seventhsynergy

    seventhsynergy

    Joined:
    Aug 1, 2008
    Posts:
    69
    This probably isn't strictly a bug, but I just downloaded MasterServer_0.1.0.zip and tried to compile the Visual Studio version in Visual Studio Express 2008 (SP1) and TCPInterface.cpp would not compile as it could not find a definition for printf

    Code (csharp):
    1. \masterserver_0.1.0\raknet\sources\tcpinterface.cpp(70) : error C3861: 'printf': identifier not found
    So I added <stdio> to the includes and it seems OK now

    Code (csharp):
    1. #ifdef _WIN32
    2. //#include <Shlwapi.h>
    3. #include <stdio.h>
    4. #include <process.h>
    5. #else
    I presume this is OK?
     
  2. Ethan

    Ethan

    Joined:
    Jan 2, 2008
    Posts:
    501
    I did the same thing and it worked for me.