-1

Possible Duplicate:
Gui toolkits, which should I use?
What is the best library to use when writing GUI applications in C++?

I wanted to create a program compatible on both Windows and Mac OS X using C++ but I am uncertain of what to use for forms, windows, etc. Would I have to convert the code later on, is there some alternative GUI I can use, or could I even create custom forms using basic C++ code?

Community
  • 1
  • 1
user1107190
  • 37
  • 1
  • 5
  • 1
    possible duplicate of [Gui toolkits, which should I use?](http://stackoverflow.com/questions/584734/gui-toolkits-which-should-i-use) [What is the best library to use when writing GUI applications in C++?](http://stackoverflow.com/questions/5061877/what-is-the-best-library-to-use-when-writing-gui-applications-in-c) – Cody Gray - on strike Dec 20 '11 at 05:45

2 Answers2

1

Be very strict about the MVC separation. Implement the view twice: once for Windows API with C++, once for Cocoa with Obj-C. Link as appropriate.

If you don't care about the native look and feel, use Qt as Saif suggested.

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
Amadan
  • 191,408
  • 23
  • 240
  • 301
  • 1
    Can't agree with this enough. Enforcing a strict separation is not only a good design practice, it also allows you to create appropriate per-platform interfaces. Native look and feel is exceptionally important for ease of use. Qt just doesn't get this right. I make a long-winded version of the same argument [here](http://stackoverflow.com/a/5061959/366904). – Cody Gray - on strike Dec 20 '11 at 05:55
  • Thank you for the link. I didn't recognize the importance of native look until you mentioned it. – user1107190 Dec 20 '11 at 07:05
0

Use the Qt framework. It's cross-platform.

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
Saif al Harthi
  • 2,948
  • 1
  • 21
  • 26