C++ Static Library failing to include ctime

1 post / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dear all,

 

I've created a simple C++ static library and I'm linking to:

..\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\arm-none-eabi\lib\thumb\v7e-m\libc_nano

..\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\arm-none-eabi\lib\thumb\v7e-m\libstdc++_nano

 

I have a single source file as follows:

#include <ctime>

 

using namespace std;

 

char *testing(void)
{

    char *retval = (char *)0;
 

// TODO: Add code to retrieve and set the time.

 

    return(retval);

}

 

However, the compiler is reporting errors:

Error        '::clock_t' has not been declared
Error        '::time_t' has not been declared

Error        '::tm' has not been declared
Error        '::clock' has not been declared
Error        '::difftime' has not been declared
Error        '::mktime' has not been declared
Error        '::time' has not been declared
Error        '::asctime' has not been declared
Error        '::ctime' has not been declared
Error        '::gmtime' has not been declared
Error        '::localtime' has not been declared
Error        '::strftime' has not been declared
 

It's as if the methods for <ctime> don't exist.

 

Has anyone seen this before and know how to fix it?

 

 

 

 

Atmel Studio help output:

Microchip Studio 7 (Version: 7.0.2542 - )
© 2020 Microchip Technology, Inc.
All rights reserved.

OS Version: Microsoft Windows NT 6.2.9200.0
Platform: Win32NT

Installed Packages: Shell VSIX manifest - 7.0
Shell VSIX manifest
Version: 7.0
Package GUID: e874ffe4-fbe3-4624-9a17-61014ede02d0
Company: Atmel Corporation

Installed Packages: Atmel Start - 1.0.198.0
Atmel Start
Version: 1.0.198.0
Package GUID: F8853255-9C7B-4DC2-8E0F-64D9324AEB0E
Company: Atmel

Installed Packages: Atmel Software Framework - 3.50.0.2188
ASF
Version: 3.50.0
Package GUID: 4CE20911-D794-4550-8B94-6C66A93228B8
Company: Atmel
HelpUrl: http://asf.atmel.com/3.50.0
Release Description: ASF - 3.50.0 Release

ASF
Version: 3.49.1
Package GUID: 4CE20911-D794-4550-8B94-6C66A93228B8
Company: Atmel
HelpUrl: http://asf.atmel.com/3.49.1
Release Description: ASF - 3.49.1 Release

ASF
Version: 3.49.0
Package GUID: 4CE20911-D794-4550-8B94-6C66A93228B8
Company: Atmel
HelpUrl: http://asf.atmel.com/3.49.0
Release Description: ASF - 3.49.0 Release

ASF
Version: 3.48.0
Package GUID: 4CE20911-D794-4550-8B94-6C66A93228B8
Company: Atmel
HelpUrl: http://asf.atmel.com/3.48.0
Release Description: ASF - 3.48.0 Release

ASF
Version: 3.47.0
Package GUID: 4CE20911-D794-4550-8B94-6C66A93228B8
Company: Atmel
HelpUrl: http://asf.atmel.com/3.47.0
Release Description: ASF - 3.47.0 Release

ASF
Version: 3.46.0
Package GUID: 4CE20911-D794-4550-8B94-6C66A93228B8
Company: Atmel
HelpUrl: http://asf.atmel.com/3.46.0
Release Description: ASF - 3.46.0 Release

ASF
Version: 3.45.0
Package GUID: 4CE20911-D794-4550-8B94-6C66A93228B8
Company: Atmel
HelpUrl: http://asf.atmel.com/3.45.0
Release Description: ASF - 3.45.0 Release

ASF
Version: 3.44.1
Package GUID: 4CE20911-D794-4550-8B94-6C66A93228B8
Company: Atmel
HelpUrl: http://asf.atmel.com/3.44.1
Release Description: ASF - 3.44.1 Release

ASF
Version: 3.44.0
Package GUID: 4CE20911-D794-4550-8B94-6C66A93228B8
Company: Atmel
HelpUrl: http://asf.atmel.com/3.44.0
Release Description: ASF - 3.44.0 Release

ASF
Version: 3.43.0
Package GUID: 4CE20911-D794-4550-8B94-6C66A93228B8
Company: Atmel
HelpUrl: http://asf.atmel.com/3.43.0
Release Description: ASF - 3.43.0 Release

Installed Packages: LiveWatch - 2.0.65
LiveWatch
Version: 2.0.65
Package GUID: 7DF6DCFD-2BCA-41C7-9C0E-1B7F606B008E
Company: Atmel

Installed Packages: GdbConsole - 7.0.188
GdbConsole
Version: 7.0.188
Package GUID: 49258291-0FED-4501-881B-6BAA91BEBCA8
Company: Atmel

Installed Packages: Atmel Kits - 7.0.132
Atmel Kits
Version: 7.0.132
Package GUID: 6F4B8FE4-C464-4916-8B43-AC92431C1CDF
Company: Atmel

Installed Packages: AtmelToolchainProvider - 7.0.911
AtmelToolchainProvider
Version: 7.0.911
Package GUID: AtmelToolchainProvider.Atmel.10EF9C74-D8DA-4872-85F5-D8BB3101E245
Company: Atmel

Installed Packages: Data Visualizer Extension - 2.20.735
Data Visualizer Extension
Version: 2.20.735
Package GUID: 25dc067d-df31-4e22-be7f-cc6a77ccc7f3
Company: Atmel

Installed Packages: XC8ToolchainProvider - 1.0.128
XC8ToolchainProvider
Version: 1.0.128
Package GUID: 37ef5c0a-bc30-4ea7-bff0-9183f7fe45c2
Company: Microchip

Installed Packages: Visual Assist for Atmel Studio - 10.9.2332.3
Visual Assist for Atmel Studio
Version: 10.9.2332.3
Package GUID: 7997A33C-B154-4b75-B2AC658CD58C9510
Company: Whole Tomato Software

“We are all in the gutter, but some of us are looking at the stars.”
Oscar Wilde