Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Mac > BOOK: Beginning Mac OS X Programming
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning Mac OS X Programming
This is the forum to discuss the Wrox book Beginning Mac OS X Programming by Michael Trent, Drew McCormack; ISBN: 9780764573996
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Mac OS X Programming section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old December 3rd, 2005, 09:28 PM
Ari Ari is offline
Registered User
 
Join Date: Dec 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Building Project Fails

I'm on Chapter 3 of the book, and can't seem to get the default "Hello" project compiled. I select my Documents directory, hit "Build and Go" and just get the following error:

No launchable executable present at path.
/Users/Ari/Documents/Hello/build/Debug/Hello

I have no idea why the path is wrong. I don't do anything other than create a project with Xcode and attempt to compile. Any help would be much obliged.

Thanks.

Reply With Quote
  #2 (permalink)  
Old December 4th, 2005, 11:03 AM
Ari Ari is offline
Registered User
 
Join Date: Dec 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Never mind. I seem to have solved that problem, but I'm stuck with another one; I can built my project in Debug mode fine, but when I try to build it in Release mode, Xcode complains that there are "Undefined symbols" and goes on to list functions like printf() and scanf(), as well as some other kernel stuff. I don't know what libraries the linker can't find. Can anyone help me with this?

Reply With Quote
  #3 (permalink)  
Old December 10th, 2005, 09:52 PM
Wrox Author
 
Join Date: Nov 2005
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Oh I see. Xcode 2.2 (which I assume you are using) adds a "SDK Path" to all its new projects. This path must point to a collection of libraries and header files in the /Developer/SDKs/ directory. It may be your installation of Xcode does not include the default SDK for some reason (on my system, it's /Developer/SDKs/MacOSX10.4u.sdk ) and as a result Xcode doesn't link properly.

This is a problem because Xcode 2.2 is trying to build a Universal Binary containing both ppc and intel segments. It looks like the default 2.2 standard tool project will try to build for both architectures. This requires the MacOSX10.4u.sdk to work, since only ppc symbols are installed by the operating system.

So, one solution is to re-run your Xcode installer and make sure all the SDKs and compatibility libraries are installed. Then Xcode will link your program against the proper files.

Another solution is to change your target to build only for PowerPC.

1) Double-click your Hello Target in the Groups & Files list
2) Select the Build tab and make sure "All Configurations" and "All Settings" are visible
3) Doubleclick the word Architectures in the build settings table. A sheet will appear with two checkboxes: ppc and intel. Both checkboxes will be unchecked.
4) Check ppc and click OK

Your project should now just build a simple PowerPC binary, link against the standard system files, and work properly.

Reply With Quote
  #4 (permalink)  
Old June 9th, 2006, 12:42 AM
Registered User
 
Join Date: Jun 2006
Location: Red Ant City, Red Ant, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The message "No launchable executable present at path" appears to be the result of bug in Apple's Xcode. By default, the Apple's compleementary SDK (Software Development Kit) is installed on the first level of the hard drive directory (right near the "Applications", "Library", "System" and "Users" folders).

It seems that if the SDK ("Developer" folder) is removed from the default location it is installed at and placed elsewhere, Xcode's "Build" will not work normally. That is, when attempting to "Build" a C++ file, the message, "No launchable executable present at path", may appear. If this message appears, "Build" will likely not perform its usual functions (compile, link etc.).

The problem appears to stem from a pre-assigned path in Xcode for "MacOSX10.4u.sdk" or "MacOSX10.3.9.sdk" being inconsistent with the actual path of these folders.

There have been reports on other online forums of individuals being able to circumvent the problem, but not effectively solve the problem--modify the path of "MacOSX10.4u.sdk"

I am presently unsure as to whether or not the pre-assigned path (for the folders in the preceding paragraph) can be modified. Preferably, I would like to keep Apple's SDK in my "Applications" folder without compensating for the hassle of having to deal with the above problem.
If someone does know how to alter the pre-assigned path "MacOSX10.4u.sdk" in Xcode, I would be delighted to know.

Reply With Quote
Reply


Thread Tools
Display Modes

Posting 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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Building Saxon9 from source -- it fails mphare XSLT 2 April 28th, 2008 10:24 PM
Issue building a Setup project in vs2005 burwelj Visual Studio 2005 1 April 17th, 2008 12:08 PM
Website project vs Web Application Project... thenoseknows ASP.NET 2.0 Professional 0 January 14th, 2007 08:47 PM
Add report of one project into another project tejaswibv Crystal Reports 0 July 13th, 2005 04:40 AM
This statement fails! pankaj_daga Oracle 1 July 6th, 2004 02:38 PM



All times are GMT -4. The time now is 04:30 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.