I'm trying to add the OPN framework to add support for importing batches from a Opticon hand scanner device. I added the framework to the project
Added it in the copy build phase
And added a run path search path
The full error I got at first is this one:
dyld: Library not loaded: /Users/[original developer of framework]/Development/Mac OPN API/trunk/Sources/opn_api/build/OPN API.build/Release/OPN.build/Objects-normal/i386/OPN
Referenced from: /Volumes/Hard Disk Drive/users/[My name]/Library/Developer/Xcode/DerivedData/barcode-test2-dvksadjkbyeilghbcdcgfqwrvwcb/Build/Products/Debug/barcode-test2.app/Contents/MacOS/barcode-test2
Reason: image not found
I think I'm getting the local path to the developer's hard drive because that might have been left in by accident and is the last path that it tries to resolve before finally failing.
When I check if the framework is copied to the right directory I see that I indeed copy it in the Frameworks folder.
When I use otool to check the paths I don't see the right path anywhere:
My-MacBook:MacOS me$ otool barcode-test2 -L barcode-test2: /Users/[Original developer]/Development/Mac OPN API/trunk/Sources/opn_api/build/OPN API.build/Release/OPN.build/Objects-normal/i386/OPN (compatibility version 0.0.0, current version 0.0.0) /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 19.0.0) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 945.18.0) /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1187.39.0) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 744.19.0)
otool on the OPN binary:
My-MacBook:OPN.framework me$ otool -L OPN OPN (architecture i386): /Users/[Original Developer]/Development/Mac OPN API/trunk/Sources/opn_api/build/OPN API.build/Release/OPN.build/Objects-normal/i386/OPN (compatibility version 0.0.0, current version 0.0.0) /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 11.0.0) /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 368.35.0) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 128.0.0) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.11) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 18.0.0) OPN (architecture ppc): /Users/[Original Developer]/Development/Mac OPN API/trunk/Sources/opn_api/build/OPN API.build/Release/OPN.build/Objects-normal/ppc/OPN (compatibility version 0.0.0, current version 0.0.0) /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 11.0.0) /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 368.35.0) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 128.0.0) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.11) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 18.0.0)
Shouldn't I see something like @executable_path/../Frameworks/ or a resolved version of that here?
I added the OPN file at the right place where it's searching for it and sure it builds right now, but I really don't like to have a complete extra path through my Users directory just to make this build.
I have tried many variations of install_name_tool but every time I execute the command it doesn't give an error or a confirmation and when I check again with otool -L nothing changed.