3 Replies - 614 Views - Last Post: 17 December 2008 - 12:54 PM Rate Topic: -----

#1 chuck981996  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 5
  • View blog
  • Posts: 119
  • Joined: 03-July 08

Cross-platform applications

Posted 16 December 2008 - 08:05 PM

Hello Everyone,

I have been learning the basics of Win32 prgogramming but a thought has occurred to me: What if I want to develop a single application that would run on Windows, Mac and Linux? If that isn't possible it would be good to have something that maybe just worked on UNIX (Mac and Linux) and then develop for Windows.

I was wondering if there were and libraries that could do this?

Thanks in Advance,

Chuck981996

This post has been edited by chuck981996: 16 December 2008 - 08:06 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Cross-platform applications

#2 GWatt  Icon User is offline

  • member icon

Reputation: 278
  • View blog
  • Posts: 3,078
  • Joined: 01-December 05

Re: Cross-platform applications

Posted 16 December 2008 - 09:14 PM

Yes, you can create cross platform GUI apps. You can use the GTK or Qt libraries.
I personally love Qt, but it is completely up to you.
Was This Post Helpful? 0
  • +
  • -

#3 numerical_jerome  Icon User is offline

  • D.I.C Head

Reputation: 12
  • View blog
  • Posts: 167
  • Joined: 16-September 07

Re: Cross-platform applications

Posted 16 December 2008 - 09:18 PM

though I rarely do GUI's in C++ (and even then use tool kits), for more systems stuff, like accessing hardware ports, using berkely sockets, et cetera, I've had good luck just using macros to keep fairly "platform independent" code.

Hope this helps,

-Jerome
Was This Post Helpful? 0
  • +
  • -

#4 polymath  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 52
  • View blog
  • Posts: 670
  • Joined: 04-April 08

Re: Cross-platform applications

Posted 17 December 2008 - 12:54 PM

as long as you use standard headers, your C++ code is portable. Non-Standard headers include .h forms of C++ libraries (iostream.h and friends, though mostly supported, some compilers don't - so use plain old iostream) and pretty much anything that sounds like it's not standard (such as conio.h, windows.h, dos.h, etc).

Now, if you wish for GUI functions, you could use sdl, wxwidgets, allegro, qt, gtk (+, 2, #), etc. These all have portable runtime environments and development headers, so you can compile these on pretty much any machine you can install gcc on. All of these support Linux, BSD, Mac, and Windows, among other OSs.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1