Building and running a C++ program on Xcode.

Building and running a C++ program on Xcode.

Post by disaster_voice on Fri Sep 09, 2011 9:44 pm
([msg=61484]see Building and running a C++ program on Xcode.[/msg])

I created a simple program on a pc using code:blocks and it worked fine there. But when I open the .cpp file on my mac, using Xcode, it shows up, but I can't compile it and run it.

Does anybody have any idea on what you do here?
User avatar
disaster_voice
New User
New User
 
Posts: 11
Joined: Wed Nov 24, 2010 5:23 pm
Blog: View Blog (0)


Re: Building and running a C++ program on Xcode.

Post by LoGiCaL__ on Fri Sep 09, 2011 11:31 pm
([msg=61486]see Re: Building and running a C++ program on Xcode.[/msg])

Look into different compilers. Specifically for mac's. Also you might need to change some library's syntax. Google the compiler and convert from the one where it worked over to the one where it doesn't.

[edit]
Sorry, read it to fast didn't realize the Xcode parameter.
[/edit]
User avatar
LoGiCaL__
Moderator
Moderator
 
Posts: 1048
Joined: Sun May 30, 2010 12:33 pm
Blog: View Blog (0)


Re: Building and running a C++ program on Xcode.

Post by disaster_voice on Sun Sep 11, 2011 10:04 am
([msg=61502]see Re: Building and running a C++ program on Xcode.[/msg])

I've tried putitng code:blocks on my mac, but even though the developer tools are on it, code:blocks wont start.

What do you mean by change the library's syntax. Sorry, I'm not very familiar with programming. I just got started learning C++.
User avatar
disaster_voice
New User
New User
 
Posts: 11
Joined: Wed Nov 24, 2010 5:23 pm
Blog: View Blog (0)


Re: Building and running a C++ program on Xcode.

Post by centip3de on Sun Sep 11, 2011 12:56 pm
([msg=61505]see Re: Building and running a C++ program on Xcode.[/msg])

disaster_voice wrote:I created a simple program on a pc using code:blocks and it worked fine there. But when I open the .cpp file on my mac, using Xcode, it shows up, but I can't compile it and run it.

Does anybody have any idea on what you do here?


It should work... Unless you have it in some-sort-of "protected" mode.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rick Cook
User avatar
centip3de
Moderator
Moderator
 
Posts: 1217
Joined: Fri Aug 20, 2010 5:46 pm
Blog: View Blog (0)



Return to C and C++

Who is online

Users browsing this forum: No registered users and 0 guests