Any other C++ developers here? I have a bit of a problem and I don't really know where to go for help.
I made this game
. Because the game was made using SDL/OpenGL and I carefully controlled the libraries I used, I'm able to do all the development on my mac and just run the game through mingw to create a windows binary. In theory, also, it ought to be possible to just compile the game for Linux and it should run.
However, I'm running into trouble when I try to actually create a Linux binary. What I'd ideally like to do is set up a crosscompiler, like the mingw install I already have for compiling Windows, on my computer. But I have two basic problems.
First, I'm not even really sure what target I'm supposed to be hitting with this crosscompiler! My understanding is when you build/install gcc you have to specify a single "target" that the gcc you're building compiles for, and this includes some fairly specific things like a libc and such that you're linking against. But aren't there more than one libc in wide use today?
Is it actually possible to compile just for some kind of generic "i386-linux" target and create a binary that different linuxes can run? Will I have to create separate binaries for different distributions, or different versions of a same distribution? (I'm not too worried about package managers, in theory my program should just be able to run out of the directory you unzip it into).
Second, where exactly do I get OpenGL headers from? When I installed mingw it came with opengl headers. However, I did some abortive attempts awhile back to compile my program on a linux server I have access to, and if I understood things correctly (maybe I didn't) apparently there are no standard linux headers? What was claimed to me at the time was that linux opengl headers actually come along with your video card drivers, like you have to install the nvidia drivers and the headers come with it. But this seems to mean that if you're compiling on a headless server (i.e., no X, no video card) or compiling outside of Linux altogether, you can't
install video card drivers and thus can't get the headers. Am I missing something?
Every time I look into it it seems the answer to "how do you distribute binaries on Linux?" is "distribute source". But I don't think I'm comfortable doing that at this time. Has anyone ever tried to make linux binaries, does anyone have any advice on how to proceed?