PDA

View Full Version : Adding frameworks to a framework


vbuser1338
2006.05.24, 08:06 PM
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:


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

OneSadCookie
2006.05.24, 09:10 PM
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

vbuser1338
2006.05.24, 10:14 PM
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:

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?

OneSadCookie
2006.05.24, 10:37 PM
@executable_path refers to the executable loading the framework. That means it's looking for PCRE.framework in the same folder as CEGUI.framework.

vbuser1338
2006.05.25, 08:02 AM
Ok thanks, I was thinking it was searching in the CEGUI framework because it was the one originally loading the framework.