C++ 编译mongodb c++;v3测试代码

C++ 编译mongodb c++;v3测试代码,c++,mongodb,mongo-cxx-driver,C++,Mongodb,Mongo Cxx Driver,此后 我遇到了一个错误: export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" c++ --std=c++11 test.cc -o test $(pkg-config --cflags --libs libmongocxx) c++: error: Symbol’s function definition is void: pkg-config: No such file or directory 美元是多少(pkg config--cflags

此后

我遇到了一个错误:

export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"
c++ --std=c++11 test.cc -o test $(pkg-config --cflags --libs libmongocxx)
c++: error: Symbol’s function definition is void: pkg-config: No such file or directory

美元是多少(pkg config--cflags--libs libmongocxx),永远不要使用这个?如何解决这个问题?

是一个定位头和库并为它们提供编译器标志的工具。看起来您的系统上可能没有安装它。安装它,或者删除
pkg config
节,并根据安装mongocxx的位置手动指定编译器标志。

重新启动my ArchLinux后,无错误输出,pkg config现在对我有效。谢谢