Unable to use the strftime function defined in time file
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hi,
Iam working on s32k144 board using s32 design studio for ARM version 2018.R1. I was trying to use the function strftime defined in time.c file for getting the current time and date. But while using strftime in project, Iam getting an error message saying undefined reference to 'strftime'.When I checked the include path, Iam able to see the path for the file already included.I have attached the code which Iam trying.So kindly help me with this issue.
Regards,
Anoop
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hello ,
I have tried this using the example lpuart_echo_s32k144 from the SDK (if you don't have the SDK please check the following link), adding the following code I didn't have problems with the route:
time_t rawtime;
struct tm *info;
char buffer[80];
time( &rawtime );
info = localtime( &rawtime );
strftime(buffer,80,"%x - %I:%M%p", info);
LPUART_DRV_SendDataBlocking(INST_LPUART1, (uint8_t *)buffer, 80, TIMEOUT);
I think this could be related to the project settings. Be sure that you're enabling the libraries (newlib/redlib).
For reference, I'm using S32 Design Studio for ARM (Version: 2.2)
I hope this helps you.
Best Regards,
Alexis Andalon
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hi Alexis,
Thanks for your reply.I will try this and let you know.
Regards,
Anoop