我试图让libmongocxx在Debian Jessie 64bit上运行后根据以下内容进行编译: quickstartguide
我添加了find命令返回的路径,作为编译器抱怨丢失的libmongoc-1.0.pc文件的位置:
$: sudo find / -name "libmongoc-1.0.pc"
/opt/mongo-c-driver/src/libmongoc-1.0.pc
/opt/mongo-c/lib/pkgconfig/libmongoc-1.0.pc
我尝试在pkg路径声明中设置特定的依赖项:
PKG_CONFIG_PATH=/opt/mongo-c/lib/pkgconfig c++ --std=c++11 main.cpp - o hellomongo $(pkg-config --cflags --libs libmongocxx)
但是在xx不同的尝试中我一直收到这个错误:
Package libmongoc-1.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libmongoc-1.0.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libmongoc-1.0', required by 'libmongocxx', not found
c++: error: main.cpp: No such file or directory
c++: fatal error: no input files
compilation terminated.
我希望有人能够帮助我。