monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] strptime not in MinGW time.h


From: Jack Lloyd
Subject: Re: [Monotone-devel] strptime not in MinGW time.h
Date: Wed, 19 May 2010 08:01:34 -0400
User-agent: Mutt/1.5.20 (2009-06-14)

On Wed, May 19, 2010 at 05:56:43AM -0400, Stephen Leake wrote:

> > This sounds like maybe mingw missed it. Maybe it will appear in a future
> > release?
> >
> > http://www.mail-archive.com/address@hidden/msg17739.html
> 
> Hmm. That says it's merely a header problem. So I added a local
> declaration of the function in dates.cc:
> 
> extern char *strptime (__const char *__restrict __s,
>                      __const char *__restrict __fmt, struct tm *__tp);
> 
> but now I get a link error:
> 
> dates.o: In function `ZN6date_t24from_formatted_localtimeERKSsS1_':
> c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/basic_string.h:1456:
>  undefined reference to `strptime(char const*, char const*, tm*)'

Should it be declared as extern "C"? The compiler may be looking for
the mangled name with this declaration.

-Jack



reply via email to

[Prev in Thread] Current Thread [Next in Thread]