Boost logo

Boost Users :

From: Huifeng Shen (useradd_at_[hidden])
Date: 2005-10-09 05:59:13


I try to compile the first.cpp example of boost program_options library
I use the command g++ first.cpp -lboost_program_options-mt. It fails when
linking.

But I also try use the same command to compile simple_ls.cpp of filesystem,
boost_back_inserter_example.cpp of iostream, days_alive.cpp of date_time(The
library link is also different). It compiles and works as expected. I use
depends.exe of VS.Net 2003 to prove the exe is depended on the dll file.

The error of program_options is as below
Info: resolving vtable for boost::program_options::variables_mapby linking
to __imp___ZTVN5boost15program_options13variables_mapE (auto-import)
Info: resolving vtable for
boost::program_options::value_semantic_codecvt_helper<char>by linking to
__imp___ZTVN5boost15program_options29value_semantic_codecvt_helperIcEE
(auto-import)
Info: resolving boost::program_options::arg by linking to
__imp___ZN5boost15program_options3argE (auto-import)
Info: resolving vtable for boost::program_options::validation_errorby
linking to __imp___ZTVN5boost15program_options16validation_errorE
(auto-import)
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cckbcaaa.o(.text$_ZN5boost15program_optio
ns13variables_mapD1Ev[boost::program_options::variables_map::~variables_map(
)]+0x3a):first.cpp: variable 'vtable for
boost::program_options::variables_map' can't be auto-imported. Please read
the documentation for ld's --enable-auto-import for details.
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cckbcaaa.o(.text$_ZN5boost15program_optio
ns29value_semantic_codecvt_helperIcED2Ev[boost::program_options::value_seman
tic_codecvt_helper<char>::~value_semantic_codecvt_helper()]+0xb):first.cpp:
variable 'vtable for
boost::program_options::value_semantic_codecvt_helper<char>' can't be
auto-imported. Please read the documentation for ld's --enable-auto-import
for details.
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cckbcaaa.o(.text$_ZN5boost15program_optio
ns29value_semantic_codecvt_helperIcEC2Ev[boost::program_options::value_seman
tic_codecvt_helper<char>::value_semantic_codecvt_helper()]+0x16):first.cpp:
variable 'vtable for
boost::program_options::value_semantic_codecvt_helper<char>' can't be
auto-imported. Please read the documentation for ld's --enable-auto-import
for details.
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cckbcaaa.o(.text$_ZN5boost15program_optio
ns16validation_errorD2Ev[boost::program_options::validation_error::~validati
on_error()]+0x3a):first.cpp: variable 'vtable for
boost::program_options::validation_error' can't be auto-imported. Please
read the documentation for ld's --enable-auto-import for details.
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cckbcaaa.o(.text$_ZN5boost15program_optio
ns16validation_errorD1Ev[boost::program_options::validation_error::~validati
on_error()]+0x3a):first.cpp: variable 'vtable for
boost::program_options::validation_error' can't be auto-imported. Please
read the documentation for ld's --enable-auto-import for details.
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cckbcaaa.o(.text$_ZN5boost15program_optio
ns16validation_errorC1ERKSs[boost::program_options::validation_error::valida
tion_error(std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&)]+0x53):first.cpp: variable 'vtable for
boost::program_options::validation_error' can't be auto-imported. Please
read the documentation for ld's --enable-auto-import for details.
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cckbcaaa.o(.text$_ZN5boost15program_optio
ns16validation_errorC2ERKS1_[boost::program_options::validation_error::valid
ation_error(boost::program_options::validation_error
const&)]+0x53):first.cpp: variable 'vtable for
boost::program_options::validation_error' can't be auto-imported. Please
read the documentation for ld's --enable-auto-import for details.
collect2: ld returned 1 exit status

I want to know how to link the dynamic library of program_options


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net