Opened 20 years ago

Closed 18 years ago

#135 closed Support Requests (Fixed)

link errors with Date_Time library

Reported by: nobody Owned by: az_sw_dude
Milestone: Component: None
Version: None Severity:
Keywords: Cc:

Description

I use boost date_time library in my program. And I fall in 
trouble.
I can not build my program, there occurs some link 
errors.

I'v ran bjam in boost_1_29_0/libs/date_time/build/ , and 
get a lib file in
boost_1_29_0/libs/date_time/build/bin/libboost_date_tim
e.a/gcc/debug/ . I copy
it to my lib directory, and then build my program, the 
link errors seem less,
as the list.

All these occurs on Redhat Linux 7.1, with GCC 2.96. 
And the makefile is
generated by Kdevelop 2.0.

g++ -O0 -g3 -Wall -I/usr/local/include -
I/usr/include/mysql -o .libs/mccps argpa
rse.o main.o  -L/usr/local/lib /usr/local/lib/libsqlplus.so -
L/usr/lib/mysql -lz
 -lmysqlclient -lboost_date_time -Wl,--rpath -
Wl,/usr/local/lib
main.o: In function `basic_string<char, 
string_char_traits<char>, __default_allo
c_template<true, 0> >::alloc(unsigned int, bool)':
/usr/include/g++-3/std/bastring.h
(.boost::date_time::date<boost::gregorian::date
, boost::gregorian::gregorian_calendar, 
boost::date_time::date_duration<long> >:
:gnu.linkonce.t.year_month_day(void) const+0x15): 
undefined reference to `boost:
:date_time::gregorian_calendar_base<boost::date_time::
year_month_day_base<boost:
:gregorian::greg_year, boost::gregorian::greg_month, 
boost::gregorian::greg_day>
, unsigned long>::from_day_number(unsigned long)'
/usr/include/g++-3/std/bastring.h
(.boost::date_time::date<boost::gregorian::date
, boost::gregorian::gregorian_calendar, 
boost::date_time::date_duration<long> >:
:gnu.linkonce.t.
(boost::date_time::year_month_day_base<boost::gregori
an::greg_ye
ar, boost::gregorian::greg_month, 
boost::gregorian::greg_day> const &)+0x12): un
defined reference to 
`boost::date_time::gregorian_calendar_base<boost::date
_time
::year_month_day_base<boost::gregorian::greg_year, 
boost::gregorian::greg_month,
 boost::gregorian::greg_day>, unsigned 
long>::day_number(boost::date_time::year_
month_day_base<boost::gregorian::greg_year, 
boost::gregorian::greg_month, boost:
:gregorian::greg_day> const &)'
collect2: ld returned 1 exit status
make: *** [mccps] Error 1

But my program still can not build. Help me! Thanks.

Change History (3)

comment:1 by nobody, 20 years ago

Logged In: NO 

Look for DATE_TIME_INLINE

comment:2 by az_sw_dude, 18 years ago

Logged In: YES 
user_id=579686

Sorry for the slow response on this -- somehow didn't see
it. But as the followup indicates in 1.29 DATE_TIME_INLINE
was probably at the root of the problem.  This has been
removed in later releases.  Closing this request...

Jeff

comment:3 by az_sw_dude, 18 years ago

Status: assignedclosed
Note: See TracTickets for help on using tickets.