Jump to content
  • Advertisement
Sign in to follow this  
Fukushuusha

SDL&OpenGL multi-platform

This topic is 3776 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey all, I am trying to develop a simulation, just for the fun of it for now and I am using openGL and SDL just because I was told that this combination achieves multi-platformity(new word! :) ) My problem is ... how? Say I got my program with my source code and my .exe file in this computer which runs on windows. I have another computer in my house. It runs on Linux only. I want to use that other computer to test the simulation. How can I make this simulation I am developing run on the Linux machine? This might seem like a noobish question. Well .. it is, I had never concerned myself with portability until now, and I have no idea how it is achieved. Thanks in advance for any answer! :)

Share this post


Link to post
Share on other sites
Advertisement
It's quite simple. You compile the program on the Linux computer, which will give you Linux-compatible binaries.

Obviously, this requires that you do not use any windows-specific headers or libraries, and that you have a usable compiler (and necessary libraries) on the Linux machine. It's extremely likely that you'll use gcc on Linux, together with some sort of IDE (or Make). If you're not using gcc on Windows, you should expect some minor compatibility problems when you first try to compile the application, resulting from you relying on undefined behaviour.

Myself, I use Visual Studio on Windows and gcc with Code::Blocks on Linux. I keep separate project files on each system, which contain information about where to find library headers and binaries, while I share the actual code through a versioning system (SVN in my case). It is a bit of a pain to set everything up, but once it's up and running it's a joy to work with.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!