Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mark28

macrumors 68000
Original poster
Jan 29, 2010
1,632
2
Do C++ libraries work in Xcode / Cacao?

I'm not going to run into problems if I program in C++ with Xcode / Cacao for Windows users?
 

jiminaus

macrumors 65816
Dec 16, 2010
1,449
1
Sydney
Do C++ libraries work in Xcode / Cacao?

I'm not going to run into problems if I program in C++ with Xcode / Cacao for Windows users?

Cocoa is not C++, but Objective-C. You could use Objective-C++ to use Objective-C objects from C++ code.

Whether you can take your C++ code to Windows, or vice-versa, will depend on the portability of C++ code in question. In particular, whether the libraries the C++ code relies on is portable. Which IDE is used to create the C++ code is not much of a factor.
 

balamw

Moderator emeritus
Aug 16, 2005
19,366
979
New England
You might also want to read this recent thread: https://forums.macrumors.com/threads/1180274/ while the IDE used to write the code will not matter, you will likely use different code for the two platforms to develop your GUI unless you use something cross-platform like wxwidgets. If you do your code will generally look a bit "foreign" on all systems so YMMV.

B
 

ehoui

macrumors regular
Jan 27, 2011
217
0
You might also want to read this recent thread: https://forums.macrumors.com/threads/1180274/ while the IDE used to write the code will not matter, you will likely use different code for the two platforms to develop your GUI unless you use something cross-platform like wxwidgets. If you do your code will generally look a bit "foreign" on all systems so YMMV.

B

What is the example of an application with a x-platform GUI that actually looks good? Games do not count. I can't think of one. Can you?
 

jiminaus

macrumors 65816
Dec 16, 2010
1,449
1
Sydney
VisIt visualization tool... looks great on mac, linux, and windows

Are you serious?! VisIt neither look nor feels anything like a native Mac OS X app.
 

Attachments

  • visit.png
    visit.png
    380.5 KB · Views: 117

itsmrjon

macrumors regular
Jun 11, 2011
122
0
Chicago
Are you serious?! VisIt neither look nor feels anything like a native Mac OS X app.

I agree it doesnt look native... but it looks good! or atleast imho it does

or maybe i'm just so used to linux I don't recognize it.. and visit looks 20x better than TecPlot or FieldView on a mac

ok ok.. how about Qt
 

PatrickCocoa

macrumors 6502a
Dec 2, 2008
751
149
There are many things I don't know

VisIt visualization tool... looks great on mac, linux, and windows

I don't know what VisIt is, but I know that it doesn't look great on mac, linux, and windows. Whatever it is can look great on AT MOST one of the three.
 

Manderby

macrumors 6502a
Nov 23, 2006
500
92
Do C++ libraries work in Xcode / Cacao?

I'm not going to run into problems if I program in C++ with Xcode / Cacao for Windows users?
The answer to the first question is Yes. One important hint at the beginning: Objective-C files have the suffix .m, Objective-C++ files have .mm (two emms). This should spare you some hours of frustration.

Aside from that, its XCode and Cocoa, not Xcode and Cacao. And you won't run into problems different to any other cross-plattform code. Which means: You may experience a lot. Starting-Hint: Be very careful with templates, try to stay away from STL if possible. They do not always compile or even behave the same way on different platforms/compilers/configurations.
 

jiminaus

macrumors 65816
Dec 16, 2010
1,449
1
Sydney
VLC, Mathematica, and Google Earth use QT and seem just fine to me GUI wise.

VLC has platform-specific UI layers. Depending on your version, the Mac OS X UI for VLC is either Carbon or Cocoa.


Cocoa isn't any language, it's a framework. /nitpick

Loose language on my part. I meant Cocoa is not written in or developed for C++, but Objective-C.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.