Home arrow Forums  
Sunday, 20 May 2012  
Latest Forums
Welcome, Guest
Please Login or Register.    Lost Password?

uctime_t error
(1 viewing) (1) Guest
Go to bottomPage: 12
TOPIC: uctime_t error
#13
uctime_t error 4 Years, 1 Month ago Karma: 0
When I test this example:

utctime_t utcTime;

utcTime.setYMD(8,2,1);
utcTime.setHMS(13,12,10);
cout << to_simple_string(utcTime) << endl;

generalizedtime_t generalTime(utcTime);
cout << to_simple_string(generalTime) << endl;


I get this error:

:: === Primero, Debug ===
/usr/include/boost/date_time/date_formatting.hpp:44: undefined reference to `boost::gregorian::greg_month::as_short_string() const'
vasconce1o
Fresh Boarder
Posts: 14
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#14
Re:uctime_t error 4 Years, 1 Month ago Karma: 0
Are you including the date_time library in your build?

If you look at the example directory Jamfile, you'll see the requirement:

project : requirements
<include>$(BOOST_ROOT)
<include>../../../
<library>$(BOOST_ROOT)/libs/date_time/build//boost_date_time
<define>BOOST_ALL_NO_LIB=1
;
softwareace
Administrator
Posts: 23
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
Andreas Haberstroh
Ethernet (n) Device used to catch the Etherbunny
 
#15
Re:uctime_t error 4 Years, 1 Month ago Karma: 0
I do this:

using namespace std;

#include <boost/asn1.hpp>

using namespace boost;
using namespace asn1;

int main()
{
utctime_t utcTime;

utcTime.setYMD(8,2,1);
utcTime.setHMS(13,12,10);
cout << to_simple_string(utcTime) << endl;

generalizedtime_t generalTime(utcTime);
cout << to_simple_string(generalTime) << endl;

return 0;
}


And I use this same way to encode/decode and work it.
vasconce1o
Fresh Boarder
Posts: 14
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#16
Re:uctime_t error 4 Years, 1 Month ago Karma: 0
and I #include <iostream> too.
vasconce1o
Fresh Boarder
Posts: 14
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#17
Re:uctime_t error 4 Years, 1 Month ago Karma: 0
okay, good. Now you can encode data to transmit over a socket. Take a look at Boost.ASIO, or look at the query.cc example.
softwareace
Administrator
Posts: 23
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
Andreas Haberstroh
Ethernet (n) Device used to catch the Etherbunny
 
#18
Re:uctime_t error 4 Years, 1 Month ago Karma: 0
Sorry, but I was confused. What I previously not working.
vasconce1o
Fresh Boarder
Posts: 14
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 12
Moderators: softwareace
Top