Results 1 to 4 of 4

Thread: Compiling on Mac OS X

  1. #1
    Serf
    Join Date
    Jun 2009
    Posts
    2

    Default Compiling on Mac OS X

    I've encountered some difficulties compiling ClanLib projects in mac OS X, and I'm hoping that somebody has some tips for me.

    I have successfully compiled the clanlib frameworks version 1.0.0 on mac os 10.5.7 using GCC 4.0.1 and XCode Version 3.0, and I can also compile and run the example applications using the Examples_xcode_v2x file in the examples folder.

    My problem comes when I attempt to create my own project files and include the clanlib frameworks. I can link them without any problems or errors, but when I build and run my application, XCode says that my application "exited with status 5. The debugger is still running. Use 'restart' to debug again." From my own research, I have determined that a status 5 means a SIGTRAP error. Following the directions in the documentation, I have toyed with the settings for symbols and inline functions, but neither changed anything.

    Running my application from the terminal results in the following:
    Code:
    dyld: Library not loaded: @executable_path/../Frameworks/ClanApp.framework/Versions/A/ClanApp
      Referenced from: [OMITTED: full path to application]
      Reason: image not found
    Trace/BPT trap
    I have also tried disabling libraries and commenting out (almost) the entire main.cpp file, to the point where nothing is actually compiling. All the same, I get the SIGTRAP error.

    What makes all this even worse is that I KNOW there isn't anything wrong with clanlib per se, because I can put my own CPP files into the example XCode project, and they'll run just fine, it's only when I create my own project files with the clanlib frameworks.

    So: what am I doing wrong? I assume it's something to do with the way I'm linking my libraries, but what's the correct way to create a new clanlib project?

  2. #2
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,377

    Default

    Hmm... maybe your project is not copying the used frameworks to the app? If you look at the finished .app directory (right click the app and choose Show Package Contents) you should verify that the CL frameworks are inside.
    Seth A. Robinson
    Robinson Technologies

  3. #3
    Lesser Knight
    Join Date
    May 2007
    Posts
    46

    Default

    I've seen this many times, essentially every time I start a new project.

    You need to copy the Frameworks to your Exe bundle. If there isn't a "Copy Files" step in your "Target", you need to add one. The "Get Info" window has a drop down for where in the bundle to place the referenced files, select "Frameworks" and drag the frameworks from the file section of the project.

  4. #4
    Serf
    Join Date
    Jun 2009
    Posts
    2

    Default Thank You!

    A ha! Thank you madmark: that solved it! I would never have figured that one out on my own!

    Perhaps instructions on how to perform that step should be placed in the macintosh instructions document? Or perhaps I just missed something. Anyway, THANKS!

Similar Threads

  1. Compiling
    By SushiBox in forum Novashell Game Creation System
    Replies: 2
    Last Post: 11-27-2008, 02:41 AM
  2. Compiling error on OS X 10.5
    By dac118 in forum Official ClanLib SDK Forums
    Replies: 0
    Last Post: 03-21-2008, 03:56 PM
  3. Help wuth compiling
    By lxtest in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 10-29-2007, 02:37 AM
  4. Compiling problems
    By nerull in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 10-03-2007, 05:36 AM
  5. error compiling 0.9 svn
    By voudras in forum Official ClanLib SDK Forums
    Replies: 0
    Last Post: 01-11-2007, 06:47 AM

Bookmarks

Bookmarks

Posting Permissions

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