Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > How do I generate an executable instead of an object file?

How do I generate an executable instead of an object file?
Thread Tools
Fresh-Faced Recruit
Join Date: Jul 2005
Status: Offline
Reply With Quote
Oct 3, 2005, 02:06 PM
 
I go to a university, and when logged into the university's computers, I generate a Makefile with a program called makemake (which I think is something made here for our courses), and make it from there. I've tried compiling stuff I've developed using XCode, and it compiles ok, but it spits out an object file in the build directory, and not an executable program. Anyone know how to make it generate an executable instead of an object? (Everything I'm making is CLI based).
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Oct 3, 2005, 02:44 PM
 
Object files are executable. That's what an object file is in the context of a compiler — compiled code. Have you tried running it?
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
Mac Elite
Join Date: Jul 2002
Status: Offline
Reply With Quote
Oct 3, 2005, 03:23 PM
 
I'm not really sure, but aren't object files unlinked executables? So I don't think it would work. I'm think he needs to add a linking step to his makefile. But I don't really know.
     
Fresh-Faced Recruit
Join Date: Jul 2005
Status: Offline
Reply With Quote
Oct 3, 2005, 05:08 PM
 
It compiles and runs from XCode, but I'd like to "./executable <variables>" on the command line. And is there an easy way to specify variables for the test run in XCode?
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Oct 3, 2005, 05:28 PM
 
Does this work?
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
Fresh-Faced Recruit
Join Date: Jul 2005
Status: Offline
Reply With Quote
Oct 3, 2005, 06:01 PM
 
Thanks, that helps me with how to use command line arguments within XCode. I just realized that when running the executable, i was going to far into the build directory (down to into ppc). I know where the executalbe is now. Thanks anyways.
(Last edited by ShyGuy91284; Oct 3, 2005 at 06:11 PM. )
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:38 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2