Hi.

I have an OS-X project with several targets. I have a few private frameworks 
(say F1 and F2)  then a higher level private framework (F3) which depends on 
the first 2, and links against them, and then some “top level” code-bundle 
target (actually a system preferences panel) that should contain the three 
private frameworks, and link against F3.

In my final system-preferences-panel build, I copy all my private frameworks 
into the bundle, into the “Preferences” folder, etc.

At a certain point, my F3 (mid-level private framework) stopped building, 
claiming it can’t find the F1 and F2 frameworks.

I tripple checked all the related settings I can think of, and I inspected the 
build log to no avail.

1. Dependencies are as described above, and I can confirm that F1 and F2 build 
BEFORE F3 successfully.
2. Framework search path for F3 is set to “ $(inherited) 
$(CONFIGURATION_BUILD_DIR) “ which I verified to contain the built F1 and F2 
(Debug builds for the time being. Of course in runtime the dynamic loader will 
need to find the frameworks differently).
3. The log line with the failure (I broke the switches to different lines for 
readability, and replaced the framework names to F1 F2 and F3)


Ld 
/Users/motti/Library/Developer/Xcode/DerivedData/MyWorkspace-aunngrkutuziehfljvnpkfyfvcvi/Build/Products/Debug/F3.framework/Versions/A/F3
 normal x86_64
    cd /Users/motti/MyRepository/MyProjcet/MyProjcet/OsX/MyProjcet
    export MACOSX_DEPLOYMENT_TARGET=10.9
    
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
 -arch x86_64
 -dynamiclib
 -isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
 
-L/Users/motti/Library/Developer/Xcode/DerivedData/MyWorkspace-aunngrkutuziehfljvnpkfyfvcvi/Build/Products/Debug
 
-F/Users/motti/Library/Developer/Xcode/DerivedData/MyWorkspace-aunngrkutuziehfljvnpkfyfvcvi/Build/Products/Debug
 -filelist 
/Users/motti/Library/Developer/Xcode/DerivedData/MyWorkspace-aunngrkutuziehfljvnpkfyfvcvi/Build/Intermediates/MyProjcet.build/Debug/F3.build/Objects-normal/x86_64/F3.LinkFileList
 -install_name @rpath/F3.framework/Versions/A/F3
 -Xlinker  -rpath  -Xlinker @executable_path/../Frameworks
 -Xlinker -rpath  -Xlinker @loader_path/Frameworks
 -mmacosx-version-min=10.9
 -stdlib=libc++
 -framework IOKit
 -framework CoreFoundation
 -lz.1.2.5
 -framework F2
 -framework F1
 -single_module
 -compatibility_version 1
 -current_version 1
 -Xlinker -dependency_info  -Xlinker 
/Users/motti/Library/Developer/Xcode/DerivedData/MyWorkspace-aunngrkutuziehfljvnpkfyfvcvi/Build/Intermediates/MyProjcet.build/Debug/F3.build/Objects-normal/x86_64/F3_dependency_info.dat
 -o 
/Users/motti/Library/Developer/Xcode/DerivedData/MyWorkspace-aunngrkutuziehfljvnpkfyfvcvi/Build/Products/Debug/F3.framework/Versions/A/F3

ld: framework not found F2
clang: error: linker command failed with exit code 1 (use
 -v to see invocation)

What drives me mad is that it was building before, and at a certain point it 
stopped.
More clues that I can’t figure out their meaning:
1. At some time I set up the project and all targets to use Apple’s “Generic 
Versioning” mechanism — which didn’t break builds, but I removed it afterwards, 
because it caused all my code to recompile every build. My code STILL 
recompiles every time, but as far as I understand, I reset all the settings 
related to this in the project to their original state.
2. Of course I tried to remove the dependencies and link commands, and re-add 
them - to no avail.

Any clues, help, Ideas or actually anything will be greatly appreciated.




Motti Shneor

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to