我目前正在使用Qt开发一个程序,它使用了libqextserialport.1.dylib库。
我已经在Xcode中构建并运行该程序,它返回以下信息:
dyld: Library not loaded: libqextserialport.1.dylib
Referenced from: /Users/samuelreh/Desktop/QtOpenCV/build/Debug/QtOpenCV.app/Contents/MacOS/QtOpenCV
Reason: image not found
该库位于 /Users/samuelreh/Desktop/QtOpenCV/qextserialport/build/。
我可以通过切换到可执行文件夹 /Users/samuelreh/Desktop/QtOpenCV/build/Debug/QtOpenCV.app/Contents/MacOS/ 并输入以下命令来运行我的程序:
install_name_tool -change libqextserialport.1.dylib /Users/samuelreh/Desktop/QtOpenCV/qextserialport/build/libqextserialport.1.dylib QtOpenCV
我知道除此之外可能还有许多解决方案。 有人知道从x-code中最好/最优雅/最容易做到的吗?