0

Trying to compile simple example program with boost::program_options. The suggested include directive for the lib is

#include <boost/program_options.hpp>

I noticed the hard path to boost/program_options.hpp (relative to root folder) is:

boost/libs/program_options/include/boost/program_options.hpp.

And the symlinked path from the root folder boost/program_options/ points to hard path:

boost/libs/program_options/include/boost/program_options/

which is one level below the program_options.hpp file.

I assume I should set my header search path in Xcode to

boost/libs/program_options/include/

and not at boost root?

If I do the former, I get no errors in editor, and auto-completion works, but when I go to compile I get error:

fatal error: 'boost/config.hpp' file not found

#include <boost/config.hpp>

Any advice on how to include this? Have used 1/2-dozen other boost libs without problem.

bigswifty
  • 127
  • 2
  • 10
  • Hmmm...reinstalled the boost dist, and discovered the program_options.hpp file was missing from /boost/boost/program_options.hpp. Now, I'm getting a different error: undefined symbols for architecture x86_64: "boost::program_options::options_description::m_default_line_length", referenced from: _main in main.o "boost::program_options::options_description::options_description(unsigned int, unsigned int)", referenced from: – bigswifty Jul 24 '17 at 16:14

1 Answers1

0

UPDATE

Sorry, I missed that this lib was NOT header-only.

On building with the program_options lib, it's working fine.

bigswifty
  • 127
  • 2
  • 10