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 Can't import stddef.h (Read 8262 times)
GimpArm
Newbies
*
Offline


Posts: 3
Joined: Feb 11th, 2015
Can't import stddef.h
Feb 11th, 2015 at 10:57am
Print Post  
When I try to compile anything that uses stdlib.h I always get the error: "Cannot open include file: 'stddef.h': No such file or directory"

I tried adding an include directory to C:\Program Files (x86)\Arduino\hardware\tools\avr\lib\gcc\avr\4.8.1\include where there is an stdlib.h file but that doesn't seem to make a difference.

I'm using Arduino 1.5.x with Arduino Mega w/ ATmega2560 (Mega 2560)
I have Arduino 1.5.8 BETA installed and I tried with 1.5.5 with no changes.

Not sure what to do, I don't have this problem with the Arduino IDE.

Edit: I should mention I'm using VS 2013.
« Last Edit: Feb 11th, 2015 at 10:59am by GimpArm »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can't import stddef.h
Reply #1 - Feb 11th, 2015 at 11:16am
Print Post  
Hi Gimp,

I think that the Arduino Ide does not report invalid header files it just compiles without them.

Can you please post the compiler output

Thanks

  
Back to top
WWW  
IP Logged
 
GimpArm
Newbies
*
Offline


Posts: 3
Joined: Feb 11th, 2015
Re: Can't import stddef.h
Reply #2 - Feb 11th, 2015 at 11:22am
Print Post  
I attached the output.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can't import stddef.h
Reply #3 - Feb 11th, 2015 at 11:41am
Print Post  
Thanks for the output which shows that Visual Micro is not managing the compile so Visual Studio is falling back to attempting a win32 compile of the project.

When you try to compile in arduino do you use the same sketch or do you create a copy?

Thanks
  
Back to top
WWW  
IP Logged
 
GimpArm
Newbies
*
Offline


Posts: 3
Joined: Feb 11th, 2015
Re: Can't import stddef.h
Reply #4 - Feb 11th, 2015 at 12:30pm
Print Post  
Yes, it compiles fine as is with the Arduino IDE. 
I deleted the project file and everything that goes with it, started fresh and now it seems to be compiling.

Why would it have fallen back on the win32 compiler?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can't import stddef.h
Reply #5 - Feb 11th, 2015 at 12:44pm
Print Post  
If the sketch name did not match the folder name that is one rule that would cause vm to go to sleep.

By the way if you always want that include path for your avr builds then you can add it to a pattern or recipe inĀ  arduinoide/hardware/avr/platform.txt

ps: if you encounter the problem again then switch the output window to "Micro Build" and you should see at what point a compiler exception has occurred. Normally Vm handles exceptions gracefully but you might possibly have a new combination that isn't handled correctly. VS would also take over and attempt a compile if that happens. I rarely hear of the issue but worth mentioning.
« Last Edit: Feb 11th, 2015 at 8:33pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can't import stddef.h
Reply #6 - Aug 17th, 2020 at 11:59am
Print Post  
Off-Topic replies have been moved to this Topic.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint