Results 1 to 3 of 3
  1. #1

    Member Since
    Mar 27, 2007
    MacBook 2Ghz Core2Duo
    Carbon, n00b problem :)

    Thought I'd have a bash at a bit of Carbon today, but Xcode keeps moaning. Ive made this simple program to print the current time.

    #include <stdio.h>
    #include <CoreFoundation/CoreFoundation.h>
    int main (int argc, const char * argv[]) {
    	CFAbsoluteTime time;
    	time = CFAbsoluteTimeGetCurrent();
    	printf("%d", time);
        return 0;
    Now, with ZeroLink on, i get this error at runtime.

    ZeroLink: unknown symbol '_CFAbsoluteTimeGetCurrent'
    Test has exited due to signal 6 (SIGABRT).

    But with ZeroLink off, i get

    Undefined symbols:

    at compile time...

    I've obviously missed something, any help would be nice

  2. #2

    Member Since
    Mar 20, 2007
    Grapevine, Tx
    Early 2008 Mac Pro - 500 GB HD - 6 GB Ram
    I've never programmed in this language, but have some experience in and Java.

    I wonder if time = CFAbsoluteTimeGetCurrent() shouldn't be time = CFAbsoluteTime.GetCurrent()

    Note the extra period between what is probably the Object class and the method.

  3. #3

    macmini3399's Avatar
    Member Since
    Nov 25, 2005
    Nova Scotia
    Intel Core solo Mac mini 1.5GHz, Headless Powerbook G4 500MHz
    Hey. CoreFoundation is not Object-Oriented, its procedural. It should go like this:

    #import <Carbon/Carbon.h>

    int main (int argc, const char * argv[])
    printf("%d\n", (double)CFAbsoluteTimeGetCurrent());
    return 0;
    Quote Originally Posted by bubba View Post
    My wife's switching.... she just doesn't know it yet

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. n00b
    By Sc00ter in forum Schweb's Lounge
    Replies: 6
    Last Post: 06-27-2010, 08:23 PM
  2. n00b here...
    By VictorP in forum Switcher Hangout
    Replies: 2
    Last Post: 02-21-2010, 05:58 PM
  3. Diablo II Carbon Copy problem with Mac OS X
    By Apetk in forum macOS - Apps and Games
    Replies: 15
    Last Post: 12-04-2007, 04:50 PM
  4. n00b Help
    By J*Dizzle in forum Apple Desktops
    Replies: 3
    Last Post: 08-10-2006, 12:53 AM
  5. iTunes Library + aMSN N00b problem
    By Going2fast in forum Switcher Hangout
    Replies: 8
    Last Post: 04-07-2006, 11:49 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts