Tôi hiện đang phát triển một chương trình trong Qt và nó sử dụng thư viện libqextserialport.1.dylib.Làm cách nào để liên kết thư viện động trong Xcode?
tôi xây dựng nó và chạy trong x-code và nó spits lại:
dyld: Library not loaded: libqextserialport.1.dylib
Referenced from: /Users/samuelreh/Desktop/QtOpenCV/build/Debug/QtOpenCV.app/Contents/MacOS/QtOpenCV
Reason: image not found
Thư viện nằm trong/Users/samuelreh/Desktop/QtOpenCV/qextserialport/build /.
tôi có thể chạy chương trình của tôi bằng cách thay đổi vào thư mục thực thi /Users/samuelreh/Desktop/QtOpenCV/build/Debug/QtOpenCV.app/Contents/MacOS/ và nhập:
install_name_tool -change libqextserialport.1.dylib /Users/samuelreh/Desktop/QtOpenCV/qextserialport/build/libqextserialport.1.dylib QtOpenCV
tôi biết có lẽ có nhiều giải pháp bên cạnh điều này. Bất kỳ ai biết tốt nhất/thanh lịch nhất/dễ nhất để làm từ mã x?
nếu bạn đang xây dựng một tệp thực thi không có gói? – John