473,473 Members | 2,110 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Unable to compile using boost::date_time library

Hello everyone,

I was wondering if any of you have some experience with the boost
library. I am having trouble compiling code with it. Since boost is
being used a lot these days I thought some of you might have an answer.
I would greatly appreciate help with this, as I tried to search for an
answer for quite some time in vain.

I am getting error messages when I try to compile as soon as I put an
include to the boost library in the code, even if I don't actually use
the code anywhere (I did a test to see if my code wasn't breaking
anything).

This is the include I am using:

#include "boost/date_time/local_time/local_time_types.hpp"

as soon as I put it in my code (even if I don't have any other code
refering to it), I get these errors:

------ Build started: Project: PackManNG, Configuration: Debug Win32
------
Compiling...
ConsoleController.cpp
c:\codelibs\boost\boost_1_33_0\include\boost\date_ time\time.hpp(63) :
error C2146: syntax error : missing ')' before identifier 'sv'

c:\codelibs\boost\boost_1_33_0\include\boost\date_ time\time.hpp(180) :
see reference to class template instantiation
'boost::date_time::base_time<T,time_system>' being compiled
c:\codelibs\boost\boost_1_33_0\include\boost\date_ time\time.hpp(63) :
error C2146: syntax error : missing ';' before identifier 'sv'
c:\codelibs\boost\boost_1_33_0\include\boost\date_ time\time.hpp(63) :
error C2059: syntax error : ')'
c:\codelibs\boost\boost_1_33_0\include\boost\date_ time\time.hpp(64) :
error C2065: 'sv' : undeclared identifier
c:\codelibs\boost\boost_1_33_0\include\boost\date_ time\time.hpp(64) :
error C3861: 'time_': identifier not found
c:\codelibs\boost\boost_1_33_0\include\boost\date_ time\time.hpp(65) :
error C4430: missing type specifier - int assumed. Note: C++ does not
support default-int
c:\codelibs\boost\boost_1_33_0\include\boost\date_ time\time.hpp(65) :
error C2473: 'sv' : looks like a function definition, but there is no
parameter list.
c:\codelibs\boost\boost_1_33_0\include\boost\date_ time\time.hpp(66) :
error C2146: syntax error : missing ';' before identifier 'base_time'
c:\codelibs\boost\boost_1_33_0\include\boost\date_ time\time.hpp(70) :
fatal error C1903: unable to recover from previous error(s); stopping
compilation

c:\codelibs\boost\boost_1_33_0\include\boost\date_ time\posix_time\ptime.hpp(32)
: see reference to class template instantiation
'boost::date_time::base_time<T,time_system>' being compiled
with
[
T=boost::posix_time::ptime,
time_system=boost::posix_time::posix_time_system
]
Build log was saved at "file://c:\Documents and Settings\pendisch\My
Documents\Visual Studio 2005\Projects\PackManNG\Debug\BuildLog.htm"
PackManNG - 9 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
==========

The first error points to time.h, and at line 63, this is what is
written:

base_time(special_values sv) :
time_(time_system::get_time_rep(sv))
{}

My interpretation of errors is limited, but it seems to me that the
compiler doesn't recognize the type "special_values", but I have no
idea why. I put the include to the boost library correctly in the
include directories list for the compiler and also the lib for boost is
correctly listed in the linker.

This is my environment:

Windows XP, SP2, with BOTH VC++ 2003 (7.1) and VC++ 2005 (8.0). I
compiled boost with the VC++ 2005, using the bjam command as follows:

I downloaded the boost-jam-3.1.11-1-ntx86.zip, and use the bjam from
that, and then
compiled boost with the command line bjam "-sTOOLS=vc-8_0" install

I got quite a few warnings, but nothing that wouldn't compile. Mainly
about using deprecated STL keywords and the such. Otherwise it all
compiled and I got all the different version of static and dynamic
libraries.

Any help would be greatly appreciated

Jan 14 '06 #1
0 2483

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

Similar topics

3
by: KPB | last post by:
If I were to post code here that included stuff from *boost*, would the code get gigged for non-StdC++ compliance. I would think yes but maybe *boost* is a bit of a gray area on this NG. ...
8
by: googlebart2000 | last post by:
I'm about to be a new user of the Boost C++ library, and I've installed and compiled it, but I've come up empty on how to use it in my C++ programs. I can't find the documentation that explains...
2
by: Jens Hibbeler | last post by:
Hello, I am trying to compile the Boost library with the Borland Builder 6 enviorement. But it seems that it is not possible to use the Thread library which is especealli important for me. Has...
1
by: stachurr | last post by:
Hello I'm new in C, And I want to compile program which use extern function. How to do it because I always got error. Undefined first referenced symbol ...
3
by: Andreas S. | last post by:
Hi, I don't any solution any more... I have written a small tool wich uses the boost library. It compiles fine, but I can't link it. I am on a Fedora Core 6 x86_64 system. The boost library is...
5
by: Sarath | last post by:
Hi All, I've created a new group for discussing about boost library. If you are interested please join with it http://groups.google.com/group/boost-library Thanks.
2
by: desktop | last post by:
I have downloaded boost throught synaptic to Ubuntu 7.04. But I don't have the folder date_time in my /usr/inculde/boost dir. How do I get date_time?
3
by: Mark | last post by:
I want to simply get the unix style epoch time (number of secs to now from Jan 01, 1970 UTC) for use as a timestamp to track the staleness of some objects. So I don't care about time zones or...
1
by: kundasang | last post by:
Hi. I just downloaded boost library from boost.org then build and I don't know what does binary precompiled means. Well, I have installed it and I using bloodshed Dev-Cpp compiler. <bThen,...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
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...
0
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...
0
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,...
0
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...
0
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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.