• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Xcode beginner problem (tutorial build)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode beginner problem (tutorial build)


  • Subject: Re: Xcode beginner problem (tutorial build)
  • From: Lee Cullens <email@hidden>
  • Date: Thu, 29 Sep 2005 21:41:48 -0400


Markus Hitter wrote:


Am 29.09.2005 um 22:10 schrieb Lee Cullens:

/usr/bin/ld: Undefined symbols:
_InsertRect


There's no system function with this name and the tutorial you mentioned doesn't use it either. To check, ignore the underscore, the open Xcode's documentation window, do an API search and start typing the function name.

Did you type this symbol somewhere? The most similar function, regarding the name, is NSInsetRect().

The closest thing I can see is in step 5 of Editing Project Files:

   5. Finish entering the definition of PrintHello:


static OSStatus PrintHello(EventHandlerCallRef handler, EventRef event, void *data) { WindowRef window = (WindowRef)data; Rect bounds; GetWindowPortBounds(window, &bounds); EraseRect(&bounds); InsetRect(&bounds, 12, 12); TextFont(FMGetFontFamilyFromName ("\pTimes")); TextSize(48); TextFace(italic); TXNDrawCFStringTextBox(CFSTR("Hello, World!"), &bounds, NULL, NULL); return noErr; }

   Insert the following lines just before the call to ShowWindow inside
   the main function:


EventTypeSpec eventSpec = { kEventClassWindow, kEventWindowDrawContent }; InstallWindowEventHandler(window, NewEventHandlerUPP(PrintHello), 1, &eventSpec, (void *) window, NULL);

   Save your changes by choosing File > Save (Command-S).

I've gone back through the instructions five times now letter by letter.


One path for beginners to track down basic issues is to create a new Cocoa or Carbon application project and build them unmodified. They should all build/run out of the box, giving you a basic menu and an empty window. Then start modifying in small steps and see what happens.



I thought that was what I was doing with this simple "canned" Hello World introductory tutorial :-) One thing I have done in the last several tries is to copy and past directly from the tutorial - same problem :-(

I suppose I should set Xcode aside until I get further into Carbon and Cocoa,


Xcode is fine for most simple CLI apps as well: Create a new project, select "Standard Tool", hit the "Build&Run" button. There 'ya go.

If you want functionality, too, look for the "insert code here..." comment ;-)


I've had no problem creating simple CLI exercises via Terminal. The introductory Apple Xcode tutorial is the same as a Hello World C exercise, only it adds a window for the output. I have not tried it in Xcode without a window - I'll try that with the next C exercise.

but I can't see the point in an introductory tutorial if one can't successfully get through it :-)


The last time I tried the Cocoa and Cocoa Bindings Tutorials, they worked as described. I'm a long term Xcode user, though. Any specific issues?


As I noted in my original post, the only difference I saw between Apple's tutorial and Xcode was the Project > Set Active Build Configuration menu choices. That and that my attempt didn't work.

Markus

- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/



Just in case it has anything to do with my problem, I use the following path variable

Chinook ~ 501 $echo $PATH
/usr/local/bin:/Users/Chinook/PythonProjects/MyUtilities:/bin:/sbin:/usr/bin:/usr/sbin:/opt/local/bin


Chinook ~ 502 $

/usr/local/bin is at the beginning for some Python 2.4.1 work and /opt/local/bin is at the end for DarwinPorts.

The build error (in my initial post) said some "symbol" was not defined, so I didn't know how extra places to search would affect such unless it was finding a wrong version of something???


Thanks for the reply, Lee C

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Xcode beginner problem (tutorial build)
      • From: Nick Zitzmann <email@hidden>
References: 
 >Xcode beginner problem (tutorial build) (From: Lee Cullens <email@hidden>)
 >Re: Xcode beginner problem (tutorial build) (From: Markus Hitter <email@hidden>)

  • Prev by Date: Re: application packaging?
  • Next by Date: Re: Xcode beginner problem (tutorial build)
  • Previous by thread: Re: Xcode beginner problem (tutorial build)
  • Next by thread: Re: Xcode beginner problem (tutorial build)
  • Index(es):
    • Date
    • Thread