Skip to content

Commit

Permalink
Added linux libs
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Kürzeder committed Jul 27, 2019
1 parent 280cc23 commit fdb743f
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion module/RedisClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

redis_client::redis_client()
{
_client = new cpp_redis::client();
_client = new cpp_redis::client();
_subscriber = new cpp_redis::subscriber();

g_Module->AddRedisClient(this);
Expand Down
Binary file added module/lib/cpp_redis.a
Binary file not shown.
Binary file added module/lib/tacopie.a
Binary file not shown.
2 changes: 2 additions & 0 deletions module/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ project "module"
debugcommand "../mta-server/MTA Server64.exe"

filter "system:linux"
links { "tacopie.a" }
links { "cpp_redis.a" }

filter "system:not linux"
excludes { "luaimports/luaimports.linux.h", "luaimports/luaimports.linux.cpp" }
21 changes: 12 additions & 9 deletions test/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@
int main(int argc, char* argv[])
{
try {
const auto w_version_requested = MAKEWORD(2, 2);
WSADATA wsa_data;
const auto err = WSAStartup(w_version_requested, &wsa_data);
if (err != 0) {
/* Tell the user that we could not find a usable */
/* Winsock DLL. */
printf("WSAStartup failed with error: %d\n", err);
return 1;
}

#ifdef WINDOWS
const auto w_version_requested = MAKEWORD(2, 2);
WSADATA wsa_data;
const auto err = WSAStartup(w_version_requested, &wsa_data);
if (err != 0) {
/* Tell the user that we could not find a usable */
/* Winsock DLL. */
printf("WSAStartup failed with error: %d\n", err);
return 1;
}
#endif

cpp_redis::client client;
client.connect();
Expand Down
Binary file added test/lib/cpp_redis.a
Binary file not shown.
Binary file added test/lib/tacopie.a
Binary file not shown.
2 changes: 2 additions & 0 deletions test/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ project "test"
links { "cpp_redis_64.lib" }

filter "system:linux"
links { "tacopie.a" }
links { "cpp_redis.a" }

0 comments on commit fdb743f

Please sign in to comment.