Comments (12)
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.
Or take a look at the meson.build changes and copy them over to your CMakeLists.txt
from gamenetworkingsockets.
Yea, I see. I'm glad that you are working on it. Thank you for the quick response.
from gamenetworkingsockets.
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.
Probably fixed with 7db4632
But it also probably has bugs. Let me know if you find some!
from gamenetworkingsockets.
@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.
How are you building? Are you using MSYS2 or some other version of MinGW?
from gamenetworkingsockets.
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.
@tycho I building it with Mingw-w64.
from gamenetworkingsockets.
Try using MSYS2 instead.
Also STEAMDATAGRAMLIB_FOREXPORT
is already defined in meson.build -- how are you building?
from gamenetworkingsockets.
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.
Yea, I missed some stuff there actually... Thank you.
from gamenetworkingsockets.
Related Issues (20)
- Update go wrapper HOT 2
- How to build the library for steam runtime (scout?) HOT 1
- str_size macro
- incorrectly detecting if bcrypt is available HOT 3
- Building fails on Archlinux with error HOT 3
- thread sanitizer detects issues HOT 4
- valgrind: Conditional jump or move depends on uninitialised value HOT 6
- lets move to zpp::bits!? HOT 2
- Steps to build for iOS and Android
- VCPKG / Building x86-windows-static
- Where/Who to contact for console access HOT 1
- cs2 and csgo ping HOT 1
- Early Retry Mechanism for SteamNetworkingSockets Authentication HOT 9
- Build fails to succeed for Windows / Visual Studio HOT 1
- Request to add compression
- minbase_decls.h always defines DLL_EXPORT on Windows (issues with static pthread)
- Build fails with clang 16 from non utf-8 garbage character
- Q: Performance warning
- Segmentation fault on CreateListenSocketIP using WSL2 Ubuntu
- Fail to build in windows 10 x64 due to openssl HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gamenetworkingsockets.