473,769 Members | 3,923 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

boost::program_ options

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 CommandLinePars er
{
CommandLinePars er()
:desc("options" )
{}
po::options_des cription desc;
po::variables_m ap vm;
};
But the compiler says error:
compiling....
Linking to lib file: libboost_progra m_options-vc71-mt-gd-1_33_1.lib
Linking...
commandlinepars er.obj : error LNK2019: unresolved symbols "public:
__thiscall
boost::program_ options::option s_description:: options_descrip tion(class
std::basic_stri ng<char,struct std::char_trait s<char>,class
std::allocator< char const &)"

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

Thanks

Apr 20 '07 #1
1 3400
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
Apr 20 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2094
by: SnaiL | last post by:
I've try to compile simple program which uses boost::program_options and got error like this: LINK : fatal error LNK1104: cannot open file 'libboost_program_options-vc7-mt-s-1_32.lib' I was suprised, because always think that boost doesn't require any library, it uses templates, doesn't it? Maybe it is program_options error? Please help.
1
7791
by: Hardy | last post by:
Hi, just come into the boost world. just the first.cpp in the program_options examples, with many link error... devc++4.9.9.2, gcc 3.4.2, can I get your opinions on this problem? thank you~ make.exe -f "D:\temp\Makefile.win" all g++.exe -c main.cpp -o
2
2456
by: Starfox | last post by:
The Following Code: //Setup the options string InputName, OutputSkeletonName, OutputModelName; program_options::options_description OptionDesc("Available Options"); OptionDesc.add_options() ("help", "produce help message") ("input,I", program_options::value<string>(&InputName), "Input md5mesh File") ("out-skl,S", program_options::value<string>(&OutputSkeletonName),
0
402
by: Krivenok Dmitry | last post by:
I use boost program_options library in my project. But I have one trouble and can't solve it :( I writing simple wrapper class and use generic selector: /////////////////////////////////////////////////////////////////// // General options selector template <class T> void CmdLine::GetOption(const std::string& Name, T& var) { if (VariablesMap_.count(Name)) var = VariablesMap_.as<T>();
5
1993
by: p_kolya | last post by:
Hello! I'am build boost 1.32, but some libraries (program_options for example) didn't compile because of errors. For example file: boost\program_options\detail\utf8_codecvt_facet.hpp can't be compiled :( I'm use: boost 1.32 STLPort 4.6.2 Visual C++ 7.1 WinXP SP2 Prof
1
5386
by: cesco | last post by:
Hi, I'm using the boost library program_options for parsing the command line given to my program as described in the class Parameter: // Main.cpp #include "Parameter.h" using namespace std; int main(int ac, char* av)
2
3047
by: MorningStar | last post by:
I wrote the following simple program: //some includes here. int main(int argc, char* argv) { options_description desc("Usage"); desc.add_options()("help", "Show this message."); desc.add_options()("config,c", value<string>(), "Specify the configuration file."); variables_map vm;
0
2347
by: pallav | last post by:
hi i'm using the boost::program_options and i'm having some problems with syntax: the code in question is the following: vector<string> opt; po::options_description desc("Usage"); desc.add_options() ("help,h", "Print help message.")
0
1393
by: pallav | last post by:
i'm using the boost:rogram_options and i'm having some problems with syntax: the code in question is the following: vector<stringopt; po:ptions_description desc("Usage"); desc.add_options() ("nodes,n", po::value<vector<string (&opt)->default_value("*"), "Name of node(s) to print.") ;
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10216
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10049
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8873
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5309
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3565
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.