I need help with my simple web browser in Xcode

Discussion in 'Mac Programming' started by toxin, Aug 19, 2008.

  1. toxin macrumors newbie

    Joined:
    Aug 19, 2008
    #1
    Hello. I am currently building a simple web browser using XCode. My mac version is 10.4.10. For the browser, I am using information from the site http://www.macdevcenter.com/pub/a/mac/2004/01/23/webkit.html. Now, I am finished with constructing the interface with the webview. However, I am having trouble building and running it. Whenever I click the "build and go" button, It says "failed" at the bottom, and this is what it says:

    Building target “Web Trawler” of project “Web Trawler” with configuration “Debug” — (1 error)
    cd "/Users/Shaun/Web Trawler"
    /Developer/usr/bin/gcc-4.0 -o /Users/Shaun/Web\ Trawler/build/Debug/Web\ Trawler.app/Contents/MacOS/Web\ Trawler -L/Users/Shaun/Web\ Trawler/build/Debug -F/Users/Shaun/Web\ Trawler/build/Debug -F%22/Developer/SDKs/MacOSX10.4.10.sdk/System/Library/Frameworks%22 -F/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks -filelist /Users/Shaun/Web\ Trawler/build/Web\ Trawler.build/Debug/Web\ Trawler.build/Objects-normal/i386/Web\ Trawler.LinkFileList -framework Cocoa -framework WebKit -framework Cocoa -framework AppKit -framework CoreData -framework Foundation -framework WebKit -arch i386 -Wl,-Y,1455 -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
    /Developer/usr/bin/../libexec/gcc/i686-apple-darwin8/4.0.1/ld: warning -F: directory name (%22/Developer/SDKs/MacOSX10.4.10.sdk/System/Library/Frameworks%22) does not exist
    /Developer/usr/bin/../libexec/gcc/i686-apple-darwin8/4.0.1/ld: warning /Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/Cocoa.framework/Cocoa cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)
    /Developer/usr/bin/../libexec/gcc/i686-apple-darwin8/4.0.1/ld: warning /Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/WebKit.framework/WebKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)
    /Developer/usr/bin/../libexec/gcc/i686-apple-darwin8/4.0.1/ld: warning /Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/Cocoa.framework/Cocoa cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)
    /Developer/usr/bin/../libexec/gcc/i686-apple-darwin8/4.0.1/ld: warning /Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/AppKit.framework/AppKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)
    /Developer/usr/bin/../libexec/gcc/i686-apple-darwin8/4.0.1/ld: warning /Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/Foundation.framework/Foundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)
    /Developer/usr/bin/../libexec/gcc/i686-apple-darwin8/4.0.1/ld: warning /Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/WebKit.framework/WebKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)
    /Developer/usr/bin/../libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols:
    _NSApplicationMain
    /Users/Shaun/Web Trawler/build/Web Trawler.build/Debug/Web Trawler.build/Objects-normal/i386/main.o reference to undefined _NSApplicationMain
    collect2: ld returned 1 exit status
    collect2: ld returned 1 exit status
    collect2: ld returned 1 exit status
    collect2: ld returned 1 exit status
    collect2: ld returned 1 exit status
    collect2: ld returned 1 exit status
    collect2: ld returned 1 exit status
    collect2: ld returned 1 exit status
    collect2: ld returned 1 exit status
    collect2: ld returned 1 exit status
    collect2: ld returned 1 exit status
    collect2: ld returned 1 exit status
    collect2: ld returned 1 exit status
    Build failed (1 error)


    Or see it here: http://www.wikispaces.com/xcode-help

    I know that there is nothing wrong with the interface because whenever I click "Test interface", it works perfectly. I suspect there is a setting which needs to be changed. Can somebody help me?
     
  2. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #2
    You are trying to build with the 10.3.9 platform SDK but you are trying to build for Intel machines. Change the used SDK to the 10.4 SDK and everything should be fine.
     
  3. toxin thread starter macrumors newbie

    Joined:
    Aug 19, 2008
    #3
    How?

    Umm, sorry about this but, how do I do that??
     
  4. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #4
    Open your project, go to the Project menu and select Edit Project Settings. It should open a window and in the list of settings in the first box headed Architectures change the drop down field next to Base SDK to 10.4.
     
  5. toxin thread starter macrumors newbie

    Joined:
    Aug 19, 2008
    #5
    Re

    Hmm, I can't seem to find what you're talking about. Is the "Cross-Develop using Target SDK" (which is set to 10.4) drop-down what you're talking about?
     
  6. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #6
    No idea I'm afraid. It has been ages since I have done any programming on Tiger and the version of Xcode that ships with Leopard is quite a bit different. You'll have to wait till someone else who uses Tiger regularly can help.
     
  7. toxin thread starter macrumors newbie

    Joined:
    Aug 19, 2008
    #7
    I still haven't managed to figure it out.....
     
  8. toxin thread starter macrumors newbie

    Joined:
    Aug 19, 2008
  9. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #9
    Please don't bump your thread. It's both rude and against the rules.

    Anyway the errors are self explanatory. It says

    "directory name (%22/Developer/SDKs/MacOSX10.4.10.sdk/System/Library/Frameworks%22) does not exist"

    So the system is looking for a directory and it doesn't exist. Why doesn't it exist? Either the path is wrong or you've not installed the SDK. My gut feeling is that you have copy/pasted this path in and included " characters around the path as %22 is the escape code for ".
     

Share This Page