Unsolved libsqlite.dylib runtime error in Qt Creator (macOS 11.5)
Hi, I built a C++ application using Qt Creator 5.0 on macOS 11.5.2 (Big Sur). The build system is CMake.
The application is very simple; it just uses the standard library and OpenCV. I can run it normally on terminal but when I try to run it in Qt Creator, I get a runtime error message complaining that libsqlite is missing.
15:28:37: Starting /Users/guel/projects/OpenCVSample/bin/umake/clang-12.0/x86_64/release/OpenCVSample ... dyld: Library not loaded: /usr/lib/libsqlite3.dylib Referenced from: /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork Reason: Incompatible library version: CFNetwork requires version 9.0.0 or later, but libsqlite3.dylib provides version 0.0.0 15:28:37: The program has unexpectedly finished. 15:28:37: The process was ended forcefully. 15:28:37: /Users/guel/projects/OpenCVSample/bin/umake/clang-12.0/x86_64/release/OpenCVSample crashed.
I realized that the path
/usr/lib/libsqlite3.dylibdoesn't exist; actually when I do
find /usr -name "libsqlite3.dylib"I get the following paths:
/usr/local/Caskroom/miniconda/base/pkgs/sqlite-3.34.0-h17101e1_0/lib/libsqlite3.dylib /usr/local/Caskroom/miniconda/base/lib/libsqlite3.dylib /usr/local/lib/libsqlite3.dylib /usr/local/Cellar/sqlite/3.36.0/lib/libsqlite3.dylib
I tried to symlink the
/usr/lib/libsqlite3.dylibas a workaround but macOS doesn't allow me to do it, even as sudo.
Any ideas? Thanks.
Thanks to this SO answer, I solved this by unchecking "Add build library search path to DYLD_LIBRARY_PATH and DYLD_FRAMEWORK_PATH checkbox" in my project Run section.