gcc 3.3, solaris 8, compile error - 'strftime', 'localtime', etc. "not declared"

Discussion in 'C Programming' started by Bimal, Aug 20, 2003.

  1. Bimal

    Bimal Guest

    Hi,

    I upgraded my gcc from 2.95 to 3.3. When I compile some projects I get
    error messages saying...

    /usr/local/include/c++/3.3/ctime:68: error: `tm' not declared
    /usr/local/include/c++/3.3/ctime:70: error: `clock' not declared
    /usr/local/include/c++/3.3/ctime:71: error: `difftime' not declared
    /usr/local/include/c++/3.3/ctime:72: error: `mktime' not declared
    /usr/local/include/c++/3.3/ctime:73: error: `time' not declared
    /usr/local/include/c++/3.3/ctime:74: error: `asctime' not declared
    /usr/local/include/c++/3.3/ctime:75: error: `ctime' not declared
    /usr/local/include/c++/3.3/ctime:76: error: `gmtime' not declared
    /usr/local/include/c++/3.3/ctime:77: error: `localtime' not declared
    /usr/local/include/c++/3.3/ctime:78: error: `strftime' not declared

    Can anyone help?

    Thanks.
    Bimal, Aug 20, 2003
    #1
    1. Advertising

  2. Bimal

    Tim Prince Guest

    Bimal wrote:

    > Hi,
    >
    > I upgraded my gcc from 2.95 to 3.3. When I compile some projects I get
    > error messages saying...
    >
    > /usr/local/include/c++/3.3/ctime:68: error: `tm' not declared
    > /usr/local/include/c++/3.3/ctime:70: error: `clock' not declared
    > /usr/local/include/c++/3.3/ctime:71: error: `difftime' not declared
    > /usr/local/include/c++/3.3/ctime:72: error: `mktime' not declared
    > /usr/local/include/c++/3.3/ctime:73: error: `time' not declared
    > /usr/local/include/c++/3.3/ctime:74: error: `asctime' not declared
    > /usr/local/include/c++/3.3/ctime:75: error: `ctime' not declared
    > /usr/local/include/c++/3.3/ctime:76: error: `gmtime' not declared
    > /usr/local/include/c++/3.3/ctime:77: error: `localtime' not declared
    > /usr/local/include/c++/3.3/ctime:78: error: `strftime' not declared
    >
    > Can anyone help?

    It's hard to see how you could get these, unless you have mixed up C++ and
    C in some fashion. If you had C code, #include <time.h> should take care
    of these declarations.

    --
    Tim Prince
    Tim Prince, Aug 20, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JohnZing

    declared or not declared ?

    JohnZing, Feb 5, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    1,571
    Jon Paal
    Feb 5, 2006
  2. Giovanni Bajo
    Replies:
    2
    Views:
    504
    Martin v. Löwis
    Jan 27, 2008
  3. Kevin Walzer

    Re: PIL (etc etc etc) on OS X

    Kevin Walzer, Aug 1, 2008, in forum: Python
    Replies:
    4
    Views:
    374
    Fredrik Lundh
    Aug 13, 2008
  4. fAnSKyer
    Replies:
    2
    Views:
    519
    Alf P. Steinbach
    Jun 7, 2009
  5. mancat
    Replies:
    4
    Views:
    131
    mancat
    Aug 31, 2007
Loading...

Share This Page