Dean Chen
Dean Chen

Reputation: 3890

pkg-config error when compiling mongodb c++ v3 test code

Following this guid

I ran into an error:

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

What's $(pkg-config --cflags --libs libmongocxx), never use this? How to fix this?

Upvotes: 1

Views: 238

Answers (1)

xdg
xdg

Reputation: 2995

pkg-config is a tool to locate headers and libraries and provide compiler flags for them. It looks like you probably don't have it installed on your system. Either install it, or remove the pkg-config stanza and specify your compiler flags manually based on where you installed mongocxx.

Upvotes: 2

Related Questions