【发布时间】:2014-07-01 10:50:35
【问题描述】:
我用
gcc -o mongotest mongotest.c $(pkg-config --cflags --libs libmongoc-1.0)
用于编译mongodb c驱动代码,然后
LD_LIBRARY_PATH=/usr/local/lib ./mongotest
为了跑步。
如果我尝试不使用 LD_LIBRARY_PATH=/usr/local/lib 我有
./mongotest: error while loading shared libraries: libmongoc-1.0.so.0: cannot open shared object file: No such file or directory
如何在没有 LD_LIBRARY_PATH=/usr/local/lib 的情况下运行程序, 这样做是否正确?如何调试 mongodb c 驱动程序?
【问题讨论】: