Re: Porting Between Linux and Windows



On 16 June 2012 01:33, Eric Tavenner <estavenner gmail com> wrote:
I am trying to teach myself C++.  My goal is to be able to write code for
the same app in either Linux or Windows, and compile for both from the same
code.  Is this possible?

Yes, I have a largish C/C++ program which I can build for Windows and
Linux from the same source code.

I think the difficulty is likely to be in your build system rather
than the source code. I've found building gtk programs on Windows
rather painful. I build WIndows programs on Linux with a
cross-compiler.

I have Code::Blocks 10.05 on both OSes, (Fedora 17 and Windows 7) on a 64
bit machine.

I've never used code blocks, perhaps it removes some of the pain from
building on win.

Try a hello world program and see if you can get it to build and run.
For example:

http://www.levien.com/gimp/hello.html

John



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]