Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Cross Platform c/c++

  • 07-01-2012 5:25pm
    #1
    Registered Users, Registered Users 2 Posts: 1,686 ✭✭✭


    Hi,

    I have been doing c/c++ for windows using Netbeans plug-in with cygwin and codeblocks with mingw.

    The problem now is that I want to make my applications compatible with Linux.
    How do I go about doing this?

    I am running ubuntu on VirtualBox


Comments

  • Registered Users, Registered Users 2 Posts: 2,040 ✭✭✭Colonel Panic


    Here's a general list of suggestions...

    How complicated is the app? Do you use any Win32 calls? Do you link against any libraries that are Windows only?

    General rule for retrospectively porting code to another platform is set up a project or makefile. Add all the files, set up any preprocessor settings, try to get it to compile and stub out anything non cross platform until it compiles, then port whatever you stubbed out.


  • Registered Users, Registered Users 2 Posts: 7,157 ✭✭✭srsly78


    Use cmake. Works with gcc on linux, and msbuild on windows. Is a modern way of dealing with makefiles etc.

    http://www.cmake.org
    http://en.wikipedia.org/wiki/CMake

    Also I find stuff like Jenkins very useful for cross-platform stuff. You could make a change for windows that breaks linux build for example, jenkins will show these problems quickly.


Advertisement