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

jsmwoolf

macrumors regular
Original poster
Aug 17, 2011
123
0
The thing is that even though C/C++ can't naturally create graphic user interfaces(unlike Java), how do companies such as Adobe make suite software if a lot of them are written in C/C++? Do they use a special software that no one else has access to or do they use OpenGL, GTK+, etc. that's open to the public?
 
Generally crossplatform software either targets a GUI layer that is portable like GTK or there is a separation between the business logic that is in C/C++, then a platform specific GUI is written per platform that utilizes the common code implementing the logic.

Also, for now Carbon is still available on OS X, allowing GUIs in C.

-Lee
 
The thing is that even though C/C++ can't naturally create graphic user interfaces(unlike Java), how do companies such as Adobe make suite software if a lot of them are written in C/C++? Do they use a special software that no one else has access to or do they use OpenGL, GTK+, etc. that's open to the public?

There are some elegant solutions to write a program in C++ and cross compile with for all platform like using a framework like Qt.

Anyway, most of the time if you're writing a coca app in xCode witch will be writing in Objective-C you can mix C or C++ in the code since gcc is there to compile it.

In fact Objective-C is just another very elegant extension of C that provides classes and objects and manage UIs and make our life's easier.

Hope it helps! :apple:

----------

Is Carbon going away or something?

Probably, and you should not be using it. It makes no sense since you can compile C/C++ in a middle of a cocoa app. Also the technologies used by carbon are old and slow today.
 
I guess I won't use Carbon, but I was questioning it over Cocoa anyway. However, the question is when is it appropriate to use Cocoa vs. another program/GUI compiler? It always depends on what you're trying to do.
 
I guess I won't use Carbon, but I was questioning it over Cocoa anyway. However, the question is when is it appropriate to use Cocoa vs. another program/GUI compiler? It always depends on what you're trying to do.

If you're writing only a Mac app, use Cocoa. Otherwise look into the other various cross platform solutions.
 
The thing is that even though C/C++ can't naturally create graphic user interfaces(unlike Java), how do companies such as Adobe make suite software if a lot of them are written in C/C++?

They don't. They write the GUI's in Cocoa. Cocoa can mix with C/C++ no problem.
 
They don't. They write the GUI's in Cocoa. Cocoa can mix with C/C++ no problem.

Yea, but only Objective-C can talk to Cocoa although you can put functions from C/C++ into the program.
 
If you're writing only a Mac app, use Cocoa. Otherwise look into the other various cross platform solutions.

So would the best solution be GTK?
 
We use Qt at work for Linux. I recently wanted to make "multi platform" an old C application I had that was written for Windows (so old that it did Windows system calls directly without a toolkit like .Net or MFC). I used Qt and it runs fine on both OS X and Linux.

Normally, however, I use Java for cross platform development, and have for about 13 years.

I've found Objective-C reasonable but there is something about Xcode/Objective-C/Cocoa that I just find completely foreign compared to other programming environments I've used over the years. And of course when you are done you have an OS X and/or iOS only application.
 
The "best" solution is always the platform native one. In this case it is Objective-C++ and Cocoa.

How about if I plan on porting applications to different platforms?

EDIT: Oh, I didn't see your post at the time of posting talmy.
 
How about if I plan on porting applications to different platforms?

If you want to use handy parts of Foundation framework (like NSString or NSArray) for some of the underlying code, you could investigate GNUStep, which is available for Linux and Windows. I am not sure myself how well that would serve overall, though.
 
If you want to use handy parts of Foundation framework (like NSString or NSArray) for some of the underlying code, you could investigate GNUStep, which is available for Linux and Windows. I am not sure myself how well that would serve overall, though.

But, wouldn't writing code in GNUStep require people to install additional software in order to execute Objective-C?
 
gcc does Objective-C and GNUstep represents the libraries and environment. But last I looked, GNUstep is like 10-15 years out of date WRT the state of the Mac.
 
How about if I plan on porting applications to different platforms?

EDIT: Oh, I didn't see your post at the time of posting talmy.

jsmwoolf,

You seems to be exploring something. Is it merely curiousity or is it for a commercial product?

If it is for a commercial product could you give us an idea as to its nature?

Your answers will help "us" steer you in a more useful direction.
 
You seems to be exploring something. Is it merely curiousity or is it for a commercial product?
Just for curiosity, but the reason why I'm trying to find a GUI software that can be written in C/C++ is because the language can't deal with that kind of stuff and the syntax for Objective-C and Cocoa is very weird for my tastes even though I kinda understand it.

The thing is, I don't exactly have an idea because I don't want to create something that is useless to me(For Example: A simple mathematic calculation). Yet, I don't want to create something that's too hard at my level. In addition, I would like to visually see my program rather than by a console completely. However, I use the console to check stuff.
 
Just for curiosity, but the reason why I'm trying to find a GUI software that can be written in C/C++ is because the language can't deal with that kind of stuff and the syntax for Objective-C and Cocoa is very weird for my tastes even though I kinda understand it.

The thing is, I don't exactly have an idea because I don't want to create something that is useless to me(For Example: A simple mathematic calculation). Yet, I don't want to create something that's too hard at my level. In addition, I would like to visually see my program rather than by a console completely. However, I use the console to check stuff.

Learn to love the console. If you're just starting out there's no reason to mess around with a GUI yet. When you DO get to a point that you are ready to tackle GUIs, i'd focus on a single platform to begin with. If you're working on a Mac, Objective-C/Cocoa is the way to go. If you're learning C or C++ right now, just stick with that and the command line. If the command line is too boring, I'd recommend starting with a language with an easy-to-use GUI library instead of one of these. Of course, the top recommendation on this forum for use on a Mac would be Objective-C and Cocoa, which you stated are distasteful to you.

-Lee
 
However, I'm willing to adapt to Objective-C as well. It's just weird to me for now. If I focus on it, I'll pretty much get over it. When I first tried Solidworks several years ago, I hated it because it worked in a 3D environment and my brain couldn't process it. However, after taking a course in it, I got used to it and actually loved it.
 
If you value your customers, and unless you have a very specialized application an can get away with it, don't use anything but the native UI of your target platform.

If you're doing programming that targets Windows, Mac and or Linux then don't use Qt or any other cross-platform GUI layer. Mac users will bad mouth it, Windows users will mostly be indifferent to it and Linux user are used to whatever they get. This is my experience across 30 some years of commercial development and yes that is outside the range of all three of todays most common OS's and GUI's.

Refactor all code into application code and User Interface code. The application code will be cross-platform and the GUI will be custom per platform standards. Is this work? Yes but paying customers will pay more for something that "feels right", works well and integrates with other applications on their system of choice. If the user isn't happy with the look, feel and integration of your application with their system then you've wasted money developing it and you may as well not done anything for that platform in the first place.

Respect the platform and your customers will appreciate your efforts.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.