0
\$\begingroup\$

I made a server for a 3D multiplayer game I'm working on. The game is currently functional to a point where I know multiplayer gameplay is possible locally on Windows.

IDE: Visual Studio 2019 Target platforms: Windows & Ubuntu Server linked libraries: winmm.lib, ws2_32.lib, sfml-system-s-d.lib, sfml-network-s-d.lib

I want the server to work on a remotely hosted dedicated server where I have Ubuntu installed, and to be capable of connecting the client locally from Windows, how should I do this? Considering the following:

  • My project currently uses the visual C++ compiler from VS, which I presume makes my own c++ code only work on windows (correct?).
  • I've done some simple aplications for Ubuntu in C++, and know that for an aplication to work on Ubuntu, it needs to be compiled using the g++ compiler, however, this doesn't seem to be an option on my current environment.
  • Also, 2 of the libraries my sfml dependencies depend on, seem to be designed for windows (This could mean issues with the sfml modules I'm using?).
  • Finally, I also know there could be some endianness issues, for now I did a quick check and found out both my local, and remote cpu's, use little endian formats.

Additional note: I really could just install any other OS on my remote machine, including Windows, but I like Ubuntu's lightweightness, and I'm familiar with the OS.

\$\endgroup\$
9
  • \$\begingroup\$ SFML does support Linux. It should be perfectly possible to compile a program depending on SFML for Linux. If it doesn't work, then the problem must be something else. \$\endgroup\$ Commented May 16, 2020 at 19:34
  • \$\begingroup\$ Ok, I actually asked some time ago on SFML's discord server if that would be the case, and they did indeed confirm what you are saying. But those two depending windows libraries still worry me (I guess maybe they shouldn't, as long as they're there which is all sfml requests), and I still wouldn't know how to do this considering my starting point is a VS project. \$\endgroup\$ Commented May 16, 2020 at 19:37
  • \$\begingroup\$ Perhaps there is something else in your servers dependencies which relies on some windows-only library? Winsock perhaps? (wild guess) \$\endgroup\$ Commented May 16, 2020 at 19:49
  • \$\begingroup\$ If you are questioning if I'm using the winsock library myself directly, then the answer is no. Edit: not using winmm.lib directly either, and don't have any other libraries linked to the server (besides a custom one I built, which uses no extra libraries). \$\endgroup\$ Commented May 16, 2020 at 19:56
  • \$\begingroup\$ Wait, didn't you write that your program depends on ws2_32.lib? (also known as Winsock 2) \$\endgroup\$ Commented May 16, 2020 at 19:58

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.