Not logged inGosu Forums
Forum back to Help Search Register Login
Up Topic Gosu / Gosu Exchange / How do I add Gosu framework for XCode4 project?
- - By ellmo Date 2013-03-26 00:57
Hey there,
I'm completely new to XCode and even tho I've been a programmer for 4 years, I have little to no knowledge about linking and referencing files/resources when it comes to compiled languages (I'm a Ruby programmer).

I'm trying my best using general tutorials on "how to add a framework to XCode 4 project", but I'm having a rough time trying to understand how am I supposed to do this, as everything I do fails in the end.

I've simply created a new cocoa application, went to build phases / Link Binary With Libraries and added Gosu.framework there. I didn't do anything else.

Now when I try to run the application, I get this error:
dyld: Library not loaded: @executable_path/../Frameworks/Gosu.framework/Versions/A/Gosu
  Referenced from: /Users/ellmo/Library/Developer/Xcode/DerivedData/gosuTest-hkmqdspnwjepredgslldpnmuhlvx/Build/Products/Debug/
  Reason: image not found

What should I do?
Parent - - By jlnr (dev) Date 2013-03-26 01:42
You also need to copy the framework into your app bundle. To do so, select your target, go to Build Phases and add a Copy File build phase. It needs to copy Gosu.framework into the "Frameworks" folder inside your app.
Parent - - By ellmo Date 2013-03-26 14:18
Hey, thanks, things moved on, but I have another problem.
I tried to follow so I deleted main.m and AppDelegates and such, and I added main.cpp wich contains the following code:

//  main.cpp
//  gosu test

#include "main.h"
#include <Gosu/Gosu.hpp>

class MyWindow : public Gosu::Window
    :   Gosu::Window(640, 480, false)
        setCaption(L"Hello World!");

int main()
    MyWindow window;;

Whenever I try to build, the compiler returns error for IO.hpp file
Lexical or Preprocessor Issue
/Users/ellmo/xcode/gosu-mac-0.7.28/Gosu.framework/Versions/A/Headers/IO.hpp:7:10: 'boost/utility.hpp' file not found
Parent - By jlnr (dev) Date 2013-03-27 10:19
Old versions of Gosu required the boost library. Please download the latest version here:
Up Topic Gosu / Gosu Exchange / How do I add Gosu framework for XCode4 project?

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill