473,785 Members | 2,772 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 3402
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
2458
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
3048
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
2350
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
1394
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
9480
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
10319
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
9947
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6737
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
5380
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...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4046
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2877
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.