HermanssoN's picture

Crossplatform development


I'm attracted to the possibility of making my library for game programming cross platform. I've downloaded Mono and MonoDevelop.
What is not so clear to me is what I have to do to make sure my code is cross platform.
I have ofcourse installed OpenTK using the download link at the startpage.
Now, do I have to do somthing special to start working with openTK in MonoDevelop and make sure my code is cross platform?


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
HermanssoN's picture

I'm using Window 7

the Fiddler's picture

It doesn't make any difference whether you use Visual Studio or Monodevelop. As long as you avoid windows-specific APIs (i.e. WPF or DllImports of windows dlls) your binaries will work on any supported operating system.

The only thing you need to do is add OpenTK.dll.config to your project and set it to be copied to the output directory. This takes care of some cross-platform differences (e.g. opengl32.dll vs libGL.so) - the rest is automatic.

Finally, do note that most Linux distros don't support .Net 4.0 yet, so you might wish to avoid that for the time being. (By September, .Net 4.0 should be available almost everywhere, so it depends on when your application will ship).

HermanssoN's picture

That cleared things up :)