How to create boost :: program_options

I wanted to use boost :: program_options. After I installed boost, I think I need to build separatly program_options ( http://www.boost.org/doc/libs/1_43_0/more/getting_started/windows.html ). But I do not know how to do this.

I am trying to compile C: \ Program Files \ boost \ boost_1_42 \ libs \ program_options \ example \ first.cpp ( http://www.boost.org/doc/libs/1_42_0/doc/html/program_options/tutorial.html ), but probably due to the fact that I did not create the library, I have this error:

LINK : fatal error LNK1104: cannot open file 'libboost_program_options-vc90-mt-gd-1_42.lib' 

EDIT . I used the installers provided by BoostPro Computing, so I skipped installing the binaries ( http://www.boost.org/doc/libs/1_43_0/more/getting_started/windows.html#install-visual-studio-binaries )

EDIT . I also followed the instructions at http://www.boost.org/doc/libs/1_43_0/more/getting_started/windows.html#build-from-the-visual-studio-ide

+6
source share
4 answers

After reading Boost 1.54 Getting Started on the Windows guide, these are the steps you should take (this program_optionsis just a header library ). You need to install the MSVC compiler.

  • Boost .

  • ( VS):

    bootstrap.bat

    bjam.exe --build-type=complete msvc stage --with-program_options

! .\bin.v2\libs\program_options\build.

, , , bjam --show-libraries.

+2

, . , , .

.

+1

, , .

VC, .

0

CLion CMake, CMakeLists.txt:

target_link_libraries(myapp boost_program_options)

0

All Articles