Mac Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsMac Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 16th, 2006, 05:50 PM
haid's Avatar
haid haid is offline
<-- me, in the negative
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Location: /etc/php.ini
Posts: 481 haid User rank is Second Lieutenant (5000 - 10000 Reputation Level)haid User rank is Second Lieutenant (5000 - 10000 Reputation Level)haid User rank is Second Lieutenant (5000 - 10000 Reputation Level)haid User rank is Second Lieutenant (5000 - 10000 Reputation Level)haid User rank is Second Lieutenant (5000 - 10000 Reputation Level)haid User rank is Second Lieutenant (5000 - 10000 Reputation Level)haid User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 18 h 4 m 42 sec
Reputation Power: 54
Send a message via AIM to haid Send a message via MSN to haid
Xcode Tools

I just got the Xcode application, and I want to use it as a compiler for C and C++. Is there any way to do this? If not, what compilers are available for C on a Mac?
__________________
Cheers,
Ryan

Reply With Quote
  #2  
Old January 16th, 2006, 06:09 PM
ericgorr ericgorr is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 46 ericgorr User rank is Corporal (100 - 500 Reputation Level)ericgorr User rank is Corporal (100 - 500 Reputation Level)ericgorr User rank is Corporal (100 - 500 Reputation Level)ericgorr User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 13 h 9 m 27 sec
Reputation Power: 6
Quote:
Originally Posted by haid
I just got the Xcode application, and I want to use it as a compiler for C and C++. Is there any way to do this? If not, what compilers are available for C on a Mac?


Yes, it will compile C and C++ just fine.

X-Code, to a large degree, is simply an interface sitting on top of the gcc compiler.

Reply With Quote
  #3  
Old January 16th, 2006, 06:39 PM
LinuxPenguin's Avatar
LinuxPenguin LinuxPenguin is offline
fork while true;
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: May 2005
Location: England, UK
Posts: 5,535 LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)  Folding Points: 11590 Folding Title: Novice Folder
Time spent in forums: 1 Month 3 Weeks 1 Day 19 h 30 m 28 sec
Reputation Power: 1008
as i understood it was natively supportive of c, obj-c and c++?

Reply With Quote
  #4  
Old January 16th, 2006, 07:35 PM
haid's Avatar
haid haid is offline
<-- me, in the negative
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Location: /etc/php.ini
Posts: 481 haid User rank is Second Lieutenant (5000 - 10000 Reputation Level)haid User rank is Second Lieutenant (5000 - 10000 Reputation Level)haid User rank is Second Lieutenant (5000 - 10000 Reputation Level)haid User rank is Second Lieutenant (5000 - 10000 Reputation Level)haid User rank is Second Lieutenant (5000 - 10000 Reputation Level)haid User rank is Second Lieutenant (5000 - 10000 Reputation Level)haid User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 18 h 4 m 42 sec
Reputation Power: 54
Send a message via AIM to haid Send a message via MSN to haid
I just got it working. Now onto the next problem. I just compiled my first Hello World program. The first time I compiled with xCode, and the second time I compiled with Terminal's built in GCC compiler. Both times, it just gave me a small 10kb document that OS X didn't know what to do with. As far as I know, isn't compiling supposed to turn it into an application of some sort? Where do I go from here?

Thanks.

Reply With Quote
  #5  
Old January 17th, 2006, 10:34 AM
ericgorr ericgorr is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 46 ericgorr User rank is Corporal (100 - 500 Reputation Level)ericgorr User rank is Corporal (100 - 500 Reputation Level)ericgorr User rank is Corporal (100 - 500 Reputation Level)ericgorr User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 13 h 9 m 27 sec
Reputation Power: 6
Quote:
Originally Posted by haid
I just got it working. Now onto the next problem. I just compiled my first Hello World program. The first time I compiled with xCode, and the second time I compiled with Terminal's built in GCC compiler. Both times, it just gave me a small 10kb document that OS X didn't know what to do with. As far as I know, isn't compiling supposed to turn it into an application of some sort? Where do I go from here?


You really need to read the X-Code documentation. It really does contain all of the information you are looking for.

When you created your new X-Code project, what kind of project did you create?

Reply With Quote
  #6  
Old January 17th, 2006, 10:37 AM
ericgorr ericgorr is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 46 ericgorr User rank is Corporal (100 - 500 Reputation Level)ericgorr User rank is Corporal (100 - 500 Reputation Level)ericgorr User rank is Corporal (100 - 500 Reputation Level)ericgorr User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 13 h 9 m 27 sec
Reputation Power: 6
Quote:
Originally Posted by LinuxPenguin
as i understood it was natively supportive of c, obj-c and c++?


And Java and Applescript.
Comments on this post
LinuxPenguin agrees: tastes good to me

Reply With Quote
  #7  
Old January 19th, 2006, 10:27 PM
jose_e_cuervo jose_e_cuervo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 49 jose_e_cuervo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 h 52 m 25 sec
Reputation Power: 4
Quote:
Originally Posted by haid
I just got it working. Now onto the next problem. I just compiled my first Hello World program. The first time I compiled with xCode, and the second time I compiled with Terminal's built in GCC compiler. Both times, it just gave me a small 10kb document that OS X didn't know what to do with. As far as I know, isn't compiling supposed to turn it into an application of some sort? Where do I go from here?

Thanks.

It is creating an executable; its creating a Mach executable, that doesn't have an application wrapper around it. It will run, if you run it from terminal. If you want window systems on mac, I would reccomend looking into Obj-C and the NeXTSTEP library.

Oh by the way, if you don't know how to use terminal to run the application:

Go to: /Applications/Utilities/
open: Terminal
type: cd /path/name/to/executable/folder
type: ./executablename

Reply With Quote
  #8  
Old January 19th, 2006, 10:50 PM
haid's Avatar
haid haid is offline
<-- me, in the negative
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Location: /etc/php.ini
Posts: 481 haid User rank is Second Lieutenant (5000 - 10000 Reputation Level)haid User rank is Second Lieutenant (5000 - 10000 Reputation Level)haid User rank is Second Lieutenant (5000 - 10000 Reputation Level)haid User rank is Second Lieutenant (5000 - 10000 Reputation Level)haid User rank is Second Lieutenant (5000 - 10000 Reputation Level)haid User rank is Second Lieutenant (5000 - 10000 Reputation Level)haid User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 18 h 4 m 42 sec
Reputation Power: 54
Send a message via AIM to haid Send a message via MSN to haid
Nice, great advice--thanks. However, how would I get the application wrapper around it and make it run like a normal mac app?

Reply With Quote
  #9  
Old January 20th, 2006, 09:26 AM
ericgorr ericgorr is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 46 ericgorr User rank is Corporal (100 - 500 Reputation Level)ericgorr User rank is Corporal (100 - 500 Reputation Level)ericgorr User rank is Corporal (100 - 500 Reputation Level)ericgorr User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 13 h 9 m 27 sec
Reputation Power: 6
Quote:
Originally Posted by haid
Nice, great advice--thanks. However, how would I get the application wrapper around it and make it run like a normal mac app?


After you select 'New Project', you have to select the appropriate template for the kind of application you want to create. There are several.

The X-Code documentation will provide all the information you need.

Reply With Quote
  #10  
Old January 20th, 2006, 02:11 PM
haid's Avatar
haid haid is offline
<-- me, in the negative
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Location: /etc/php.ini
Posts: 481 haid User rank is Second Lieutenant (5000 - 10000 Reputation Level)haid User rank is Second Lieutenant (5000 - 10000 Reputation Level)haid User rank is Second Lieutenant (5000 - 10000 Reputation Level)haid User rank is Second Lieutenant (5000 - 10000 Reputation Level)haid User rank is Second Lieutenant (5000 - 10000 Reputation Level)haid User rank is Second Lieutenant (5000 - 10000 Reputation Level)haid User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 18 h 4 m 42 sec
Reputation Power: 54
Send a message via AIM to haid Send a message via MSN to haid
Alright, nice. I'll look into that.

However, just out of curiosity, what did OS X developers use to do this before xCode?

Reply With Quote
  #11  
Old January 20th, 2006, 02:29 PM
ericgorr ericgorr is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 46 ericgorr User rank is Corporal (100 - 500 Reputation Level)ericgorr User rank is Corporal (100 - 500 Reputation Level)ericgorr User rank is Corporal (100 - 500 Reputation Level)ericgorr User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 13 h 9 m 27 sec
Reputation Power: 6
Quote:
Originally Posted by haid
However, just out of curiosity, what did OS X developers use to do this before xCode?


Before X-Code, CodeWarrior
Before CodeWarrior, Symantec's IDE
Before Symantec's IDE, MPW

This is the basic lineage of the IDE's on the Mac (which includes pre OSX). I could mention Think C & Lightspeed C, but chose to group them with Symantec's IDE.
Comments on this post
haid agrees: Thanks for your help through this. Have some rep.
LinuxPenguin agrees: you're a font of mac knowledge

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsMac Help > Xcode Tools


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |