boost::program_options

Discussion in 'C++' started by zade, Apr 20, 2007.

  1. zade

    zade Guest

    Hi all
    boost::program_options needs be builled into libraries, static or
    dynamic. I use MSVC7.1 to build the boost::program_options for my
    project .In my .cpp file , I write:

    namespace po = boost::program_options;

    struct CommandLineParser
    {
    CommandLineParser()
    :desc("options")
    {}
    po::eek:ptions_description desc;
    po::variables_map vm;
    };
    But the compiler says error:
    compiling....
    Linking to lib file: libboost_program_options-vc71-mt-gd-1_33_1.lib
    Linking...
    commandlineparser.obj : error LNK2019: unresolved symbols "public:
    __thiscall
    boost::program_options::eek:ptions_description::eek:ptions_description(class
    std::basic_string<char,struct std::char_traits<char>,class
    std::allocator<char> > const &)"

    it is clear that the lib"libboost_program_options-vc71-mt-
    gd-1_33_1.lib" is linked, so why??

    Thanks
     
    zade, Apr 20, 2007
    #1
    1. Advertising

  2. zade

    Zeppe Guest

    zade wrote:
    > Hi all
    > boost::program_options needs be builled into libraries, static or
    > dynamic. I use MSVC7.1 to build the boost::program_options for my
    > project .In my .cpp file , I write:


    The question is OT here, you should ask in a Microsoft related ng.
    Anyway, have you built your libraries with the same version of the
    compiler that you are using for your program? Are you linking the
    correct version of the libraries (i.e., same threading model, same Debug
    information, and so)?

    Regards,

    Zeppe
     
    Zeppe, Apr 20, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hardy
    Replies:
    1
    Views:
    4,028
    Rapscallion
    May 16, 2005
  2. Starfox
    Replies:
    2
    Views:
    528
    Starfox
    Jul 25, 2005
  3. Krivenok Dmitry

    Boost program_options trouble

    Krivenok Dmitry, Sep 19, 2005, in forum: C++
    Replies:
    0
    Views:
    356
    Krivenok Dmitry
    Sep 19, 2005
  4. Krivenok Dmitry

    Boost program_options trouble

    Krivenok Dmitry, Sep 19, 2005, in forum: C++
    Replies:
    1
    Views:
    395
    mlimber
    Sep 20, 2005
  5. cesco
    Replies:
    1
    Views:
    731
Loading...

Share This Page