1

遵循本指南

我遇到了一个错误:

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) 是什么,从不使用它?如何解决这个问题?

4

1 回答 1

2

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

于 2016-11-03T13:39:03.130 回答