Adding frameworks to a framework

Member
Posts: 35
Joined: 2005.01
Post: #1
I am building the CEGUI framework which includes the PCRE framework. I do not want to have to include the PCRE framework when I include the CEGUI framework. So I want to build the PCRE framework into the frameworks directory of the CEGUI framework. So I build the PCRE framework with the Installation Path set to @executable_path/Frameworks. I know for application bundles it should be @executable_path/../Frameworks, but is the way I am doing it correct for building into another framework? I then create a copy files build phase in the CEGUI framework to copy the PCRE framework into the frameworks directory of CEGUI. This compiles fine and copies it into the CEGUI framework. The problem is when I use the CEGUI framework in a Carbon bundle it complains to me and says:

Code:
ld: warning can't open dynamic library: @executable_path/Frameworks/PCRE.framework/Versions/A/PCRE (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
ld: Undefined symbols:
_pcre_compile referenced from CEGUI expected to be defined in @executable_path/Frameworks/PCRE.framework/Versions/A/PCRE
_pcre_exec referenced from CEGUI expected to be defined in @executable_path/Frameworks/PCRE.framework/Versions/A/PCRE
_pcre_free referenced from CEGUI expected to be defined in @executable_path/Frameworks/PCRE.framework/Versions/A/PCRE

Why is it not finding it within the CEGUI framework?
Thanks,
vbuser
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
because it's looking next to the CEGUI framework. That's probably fine (just move it), but using @executable_path/../Frameworks/CEGui.framework/Frameworks would probably work too
Quote this message in a reply
Member
Posts: 35
Joined: 2005.01
Post: #3
I'm sorry I don't quite understand what you mean. Do you mean the CEGUI framework is looking for it at the wrong place? Because I have the CEGUI framework set up like this:
Code:
CEGUI.framework
     Versions
          A
               CEGUI     // The executable
               Frameworks
                    PCRE.framework

Using @executable_path/Frameworks for the PCRE install path should make the CEGUI framework search in the directory with the executable and the Frameworks directory should it not?
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #4
@executable_path refers to the executable loading the framework. That means it's looking for PCRE.framework in the same folder as CEGUI.framework.
Quote this message in a reply
Member
Posts: 35
Joined: 2005.01
Post: #5
Ok thanks, I was thinking it was searching in the CEGUI framework because it was the one originally loading the framework.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Adding friends to iOS games rubilee 0 2,488 Oct 18, 2011 05:02 AM
Last Post: rubilee
  SDL frameworks are giant. ravuya 8 4,800 Oct 9, 2006 08:40 PM
Last Post: ravuya
  physfs or howto make frameworks ? seoushi 2 2,870 Sep 16, 2006 05:58 PM
Last Post: seoushi
  LGPL and Frameworks? chuck 1 2,590 Sep 10, 2006 06:09 PM
Last Post: OneSadCookie
  Adding frameworks and resources to .app visage 9 6,220 Aug 11, 2006 05:18 AM
Last Post: ferum