Giter Club home page Giter Club logo

Comments (12)

tycho avatar tycho commented on May 14, 2024 3

No, it doesn't build under MinGW/MSYS2 yet. I was working on this just before we pushed code publicly, but my changes aren't ready for consumption yet. I intend to work on it this week.

The majority of the issues are centered around macro misuse caused by bad assumptions, such as: _WIN32/WIN32 means we "must" be compiling on Visual Studio, and that __GNUC__ means we "must" be compiling on something non-Windows.

from gamenetworkingsockets.

tycho avatar tycho commented on May 14, 2024 1

Or take a look at the meson.build changes and copy them over to your CMakeLists.txt

from gamenetworkingsockets.

nxrighthere avatar nxrighthere commented on May 14, 2024

Yea, I see. I'm glad that you are working on it. Thank you for the quick response.

from gamenetworkingsockets.

AraHaan avatar AraHaan commented on May 14, 2024

well there are special macros for cygwin and mingw that also defines _WIN32 I thought. So maybe something like this would suffice
#if defined(_WIN32) && (defined(__GNUC__) /*|| optionally include clang windows build. */) && (__cygwin__ || __mingw__)

or something around those lines.

from gamenetworkingsockets.

tycho avatar tycho commented on May 14, 2024

Probably fixed with 7db4632

But it also probably has bugs. Let me know if you find some!

from gamenetworkingsockets.

nxrighthere avatar nxrighthere commented on May 14, 2024

@tycho There is still no success:

GameNetworkingSockets\src\steamnetworkingsockets\certtool\steamnetworkingsockets_certtool.cpp: In function 'void PrintCertInfo(const CMsgSteamDatagramCertificateSigned&, std::__cxx11::string&, const char*)':
GameNetworkingSockets\src\steamnetworkingsockets\certtool\steamnetworkingsockets_certtool.cpp:204:45: error: expected ')' before 'PRIu64'
   V_sprintf_safe( szTemp, "%s\"key_id\": %" PRIu64 ",\n", pszJSONIndent, CalculatePublicKeyID( pubKey ) );
                                             ^~~~~~
GameNetworkingSockets\src\steamnetworkingsockets\certtool\steamnetworkingsockets_certtool.cpp:215:48: error: expected ')' before 'PRIu64'
   V_sprintf_safe( szTemp, "%s\"ca_key_id\": %" PRIu64 "\n", pszJSONIndent, msgSigned.ca_key_id() );
                                                ^~~~~~
GameNetworkingSockets\src\steamnetworkingsockets\certtool\steamnetworkingsockets_certtool.cpp:220:50: error: expected ')' before 'PRIu64'
   V_sprintf_safe( szTemp, "Public key ID. . : %" PRIu64 "\n", CalculatePublicKeyID( pubKey ) );
                                                  ^~~~~~
GameNetworkingSockets\src\steamnetworkingsockets\certtool\steamnetworkingsockets_certtool.cpp:226:50: error: expected ')' before 'PRIu64'
   V_sprintf_safe( szTemp, "CA key ID. . . . : %" PRIu64 "\n", msgSigned.ca_key_id() );

Solved this with #define PRIu64 "I64u".

But the next one is more fun:

GameNetworkingSockets\src\steamnetworkingsockets\clientlib\csteamnetworkingsockets.cpp:1318:53: error: function 'ISteamNetworkingSockets* SteamNetworkingSockets()' definition is marked dllimport
 STEAMDATAGRAMLIB_INTERFACE ISteamNetworkingSockets *SteamNetworkingSockets()
                                                     ^~~~~~~~~~~~~~~~~~~~~~
GameNetworkingSockets\src\steamnetworkingsockets\clientlib\csteamnetworkingsockets.cpp: In function 'ISteamNetworkingSockets* SteamNetworkingSockets()':
GameNetworkingSockets\src\steamnetworkingsockets\clientlib\csteamnetworkingsockets.cpp:1318:53: warning: 'ISteamNetworkingSockets* SteamNetworkingSockets()' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
GameNetworkingSockets\src\steamnetworkingsockets\clientlib\csteamnetworkingsockets.cpp: At global scope:
GameNetworkingSockets\src\steamnetworkingsockets\clientlib\csteamnetworkingsockets.cpp:1323:53: error: function 'ISteamNetworkingSockets* SteamNetworkingSocketsGameServer()' definition is marked dllimport
 STEAMDATAGRAMLIB_INTERFACE ISteamNetworkingSockets *SteamNetworkingSocketsGameServer()
                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GameNetworkingSockets\src\steamnetworkingsockets\clientlib\csteamnetworkingsockets.cpp: In function 'ISteamNetworkingSockets* SteamNetworkingSocketsGameServer()':
GameNetworkingSockets\src\steamnetworkingsockets\clientlib\csteamnetworkingsockets.cpp:1323:53: warning: 'ISteamNetworkingSockets* SteamNetworkingSocketsGameServer()' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
GameNetworkingSockets\src\steamnetworkingsockets\clientlib\csteamnetworkingsockets.cpp: At global scope:
GameNetworkingSockets\src\steamnetworkingsockets\clientlib\csteamnetworkingsockets.cpp:1330:33: error: function 'bool GameNetworkingSockets_Init(char (&)[1024])' definition is marked dllimport
 STEAMDATAGRAMLIB_INTERFACE bool GameNetworkingSockets_Init( SteamDatagramErrMsg &errMsg )
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
GameNetworkingSockets\src\steamnetworkingsockets\clientlib\csteamnetworkingsockets.cpp: In function 'bool GameNetworkingSockets_Init(char (&)[1024])':
GameNetworkingSockets\src\steamnetworkingsockets\clientlib\csteamnetworkingsockets.cpp:1330:33: warning: 'bool GameNetworkingSockets_Init(char (&)[1024])' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
GameNetworkingSockets\src\steamnetworkingsockets\clientlib\csteamnetworkingsockets.cpp: At global scope:
GameNetworkingSockets\src\steamnetworkingsockets\clientlib\csteamnetworkingsockets.cpp:1342:33: error: function 'void GameNetworkingSockets_Kill()' definition is marked dllimport
 STEAMDATAGRAMLIB_INTERFACE void GameNetworkingSockets_Kill()
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
GameNetworkingSockets\src\steamnetworkingsockets\clientlib\csteamnetworkingsockets.cpp: In function 'void GameNetworkingSockets_Kill()':
GameNetworkingSockets\src\steamnetworkingsockets\clientlib\csteamnetworkingsockets.cpp:1342:33: warning: 'void GameNetworkingSockets_Kill()' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]

from gamenetworkingsockets.

tycho avatar tycho commented on May 14, 2024

How are you building? Are you using MSYS2 or some other version of MinGW?

http://www.msys2.org/

from gamenetworkingsockets.

nxrighthere avatar nxrighthere commented on May 14, 2024

Solved this one with #define STEAMDATAGRAMLIB_FOREXPORT.

Moving forward:

GameNetworkingSockets\src\steamnetworkingsockets\clientlib\steamnetworkingsockets_lowlevel.cpp:1685:33: error: function 'void SteamDatagram_SetDebugOutputFunction(int, FSteamDatagramDebugOutput)' definition is marked dllimport
 STEAMDATAGRAMLIB_INTERFACE void SteamDatagram_SetDebugOutputFunction( /* ESteamDatagramSpewType */ int eDetailLevel, FSteamDatagramDebugOutput pfnFunc )
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GameNetworkingSockets\src\steamnetworkingsockets\clientlib\steamnetworkingsockets_lowlevel.cpp: In function 'void SteamDatagram_SetDebugOutputFunction(int, FSteamDatagramDebugOutput)':
GameNetworkingSockets\src\steamnetworkingsockets\clientlib\steamnetworkingsockets_lowlevel.cpp:1685:33: warning: 'void SteamDatagram_SetDebugOutputFunction(int, FSteamDatagramDebugOutput)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]

from gamenetworkingsockets.

nxrighthere avatar nxrighthere commented on May 14, 2024

@tycho I building it with Mingw-w64.

from gamenetworkingsockets.

tycho avatar tycho commented on May 14, 2024

Try using MSYS2 instead.

Also STEAMDATAGRAMLIB_FOREXPORT is already defined in meson.build -- how are you building?

from gamenetworkingsockets.

nxrighthere avatar nxrighthere commented on May 14, 2024

I just created CMakeLists since I'm not using Meson. Well, I'll try to build it with MSYS2 if I don't solve all these errors myself.

from gamenetworkingsockets.

nxrighthere avatar nxrighthere commented on May 14, 2024

Yea, I missed some stuff there actually... Thank you.

from gamenetworkingsockets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.