Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Adding Time.h breaks the build. (Read 6886 times)
terrence1
Junior Member
**
Offline


Posts: 19
Joined: Oct 29th, 2014
Adding Time.h breaks the build.
Oct 29th, 2014 at 4:25am
Print Post  
My project was compiling and running fine until I added the Time.h library.  Now it does not compile.

This post says you should never have a file called time.h due to naming conflicts.

http://stackoverflow.com/questions/14947691/c-system-file-bits-stat-h-suddenly-b...

Here are my errors: (thank you for your help)
Compiling 'EdisonAzure' for 'IntelĀ® Edison'
fcntl.h:In file included from
fast_gpio_common.c:from
stat.h:91:21: error: field 'st_atim' has incomplete type
:struct timespec st_atim;  \* Time of last access.  *\
:^
stat.h:92:21: error: field 'st_mtim' has incomplete type
:struct timespec st_mtim;  \* Time of last modification.  *\
:^
stat.h:93:21: error: field 'st_ctim' has incomplete type
:struct timespec st_ctim;  \* Time of last status change.  *\
:^
fcntl.h:In file included from
variant.cpp:from
stat.h:91:21: error: field 'st_atim' has incomplete type
:struct timespec st_atim;  \* Time of last access.  *\
:^
stat.h:92:21: error: field 'st_mtim' has incomplete type
:struct timespec st_mtim;  \* Time of last modification.  *\
:^
stat.h:93:21: error: field 'st_ctim' has incomplete type
:struct timespec st_ctim;  \* Time of last status change.  *\
:^
stat.h:152:21: error: field 'st_atim' has incomplete type
:struct timespec st_atim;  \* Time of last access.  *\
:^
stat.h:153:21: error: field 'st_mtim' has incomplete type
:struct timespec st_mtim;  \* Time of last modification.  *\
:^
stat.h:154:21: error: field 'st_ctim' has incomplete type
:struct timespec st_ctim;  \* Time of last status change.  *\
:^
Error compiling core
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12164
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Adding Time.h breaks the build.
Reply #1 - Oct 29th, 2014 at 9:10am
Print Post  
Hi,

Is the Time lib supported by the Intel Edison? I am not sure about the answer but you can prove this by opening the Intel Ide and try to build the sketch

Thanks
  
Back to top
IP Logged
 
terrence1
Junior Member
**
Offline


Posts: 19
Joined: Oct 29th, 2014
Re: Adding Time.h breaks the build.
Reply #2 - Oct 29th, 2014 at 1:56pm
Print Post  
Thanks Tim, I didn't think to do that.   

If it is not supported, do you know of a way to derive a time string like this:
yyyy.mm.dd:hh.mm.ss

Thank you for your help.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12164
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Adding Time.h breaks the build.
Reply #3 - Oct 29th, 2014 at 2:04pm
Print Post  
Hi,

I am not really sure about the answer but you can post on the intel forum.

This is a link to the forum which came up when googling the question.

https://communities.intel.com/message/227862

Sorry I can't be of more help
  
Back to top
IP Logged
 
terrence1
Junior Member
**
Offline


Posts: 19
Joined: Oct 29th, 2014
Re: Adding Time.h breaks the build.
Reply #4 - Oct 29th, 2014 at 6:21pm
Print Post  
Tim, thanks.  You misunderstood my question.  I am not trying to set the time on my board.

I am trying to get the current time in my sketch and convert that datetime to a string like

2014.10.29:10.25.32

This should not be specific to Edison or any board, it is just a simple programming question that I can't figure out because I am new to c/c++
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12164
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Adding Time.h breaks the build.
Reply #5 - Oct 29th, 2014 at 10:10pm
Print Post  
Oh I see. I'm not sure I don't really get time to play with much code these days Smiley

try the intel or arduino.cc forum it's full of clever people.

I only really get time to ensure the plugin works.

Thanks
« Last Edit: Oct 29th, 2014 at 10:11pm by Tim@Visual Micro »  
Back to top
IP Logged
 
terrence1
Junior Member
**
Offline


Posts: 19
Joined: Oct 29th, 2014
Re: Adding Time.h breaks the build.
Reply #6 - Oct 29th, 2014 at 10:34pm
Print Post  
Ok, thanks Tim.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint