I'm trying to use libpng for reading data from image file in my c++ project, making on xcode and have some problems to include it.
So, I've make the next steps:
Then, when I'm trying to compile project, I have an error:
ld: framework not found libpng clang: error: linker command failed with exit code 1 (use -v to see invocation)
What I'm doing wrong or what step was missed?
I'm new in xcode so be patient and give a detailed answer, please.
找不到库的错误通常是引荐人将标题搜索路径设置为错误,因此请建立设置/标题搜索路径,然后添加$(inherit)
Now I found solution.
I moved framework file from project folder to folder with .xcodeproj and it linked successfull: screenshot
But there is another one error on starting program:
dyld: Library not loaded: @loader_path/../Frameworks/libpng.framework/Versions/A/libpng
Referenced from: /Users/admin/Library/Developer/CoreSimulator/Devices/B875D4BF-EE6B-4601-9DFC-9C534AD6C085/data/Containers/Bundle/Application/981ECC6B-5EDB-4646-A990-510FEB619650/Happy Ball.app/Happy Ball
Reason: image not found
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.