I have created a dylib file. Successfully added it to one Terminal(Console based app through Xcode). When I run the app through Xcode they dylib is loaded and all the methods inside it works.
The issue is when I run the Consols App (Unix Executable) it fails to find the dylib and throws the following error.
DS-Anoopkumar-v:~ anoopvaidya$ /Users/anoopvaidya/Library/Developer/Xcode/DerivedData/Worker-dfytfqadwmzqmvesrzqeartqcggx/Build/Products/Debug/Worker; exit; dyld: Library not loaded: @executable_path/../libDownloader.dyli
Referenced from: /Users/anoopvaidya/Library/Developer/Xcode/DerivedData/Worker-dfytfqadwmzqmvesrzqeartqcggx/Build/Products/Debug/Worker
Reason: image not found Trace/BPT trap: 5 logout
[Process completed]
Please tell me what I am missing here, any help will be highly appreciated.