You are not logged in or registered. Please login or register to use the full functionality of this board...

 
Thread Rating:
  • 8 Votes - 2.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply 
c++ for mac?
01-15-2010, 05:02 AM
Post: #1
c++ for mac?
I am running the most recent version of snow leopard, I am wondering does coding c++ work the same? Will my c++ files work on pc and mac?

Also when using python I use wxpthon for a gui, is their a gui I can use for programming c++ on a mac? And what program/compiler do you guys recommend?

I am new to mac's sp all information is appreciated.

Guests cannot see links in the messages. Please register to forum by clicking here to see links. | Guests cannot see links in the messages. Please register to forum by clicking here to see links. | Guests cannot see links in the messages. Please register to forum by clicking here to see links. - Still in Beta
Find all posts by this user
Quote this message in a reply
01-15-2010, 09:56 AM
Post: #2
RE: c++ for mac?
C++ syntax is always the same, but on different platforms you do different things to get the end result. Some stuff is cross-platform compatible, but chances are anything you wrote isn't. Anything that used the Windows OS won't work on your Mac.

Guests cannot see links in the messages. Please register to forum by clicking here to see links. is probably your best bet for writing GUIs in C++. Not only is it easy, but also cross-platform compatible. Any GUI you make for you Mac will work on your PC and vice versa.

Guests cannot see links in the messages. Please register to forum by clicking here to see links.

I might be wrong about some of that. Feel free to correct me anyone.

Guests cannot see links in the messages. Please register to forum by clicking here to see links.
Visit this user's website Find all posts by this user
Quote this message in a reply
01-15-2010, 10:14 AM
Post: #3
RE: c++ for mac?
Yeah, the language stays the same on every platform, the code changes. For instance, with text files Windows uses CRLF for newline termination whereas UNIX uses LF from what I remember. So when you write stuff out to a text file in a program meant to run on a Mac you wanna make sure you use the right newline termination characters.

C++ GUI code written for Windows using the Win32 can pretty much be thrown away if you want to port your program to a Mac. You're going to have to write everything from scratch.

There are nice frameworks like Qt, as TrigZu said, that allow you to write cross-platform GUI code that will compile on every platform without having to change a single statement (if you write it properly).

Get Linux or die tryin'
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply