VS Arduino
>> >> stdlib.h: No such file or directory
https://www.visualmicro.com/forums/YaBB.pl?num=1520872003

Message started by Peter Wagstaff on Mar 12th, 2018 at 4:26pm

Title: stdlib.h: No such file or directory
Post by Peter Wagstaff on Mar 12th, 2018 at 4:26pm
Hi, My installation of Atmel Studio has suddenly stopped working with the error
"arduino.h: 23:20: fatal error: stdlib.h: No such file or directory"
Am I really missing this file? I have not changed anything at all and the arduino sketches compile and upload fine with Arduino IDE.  I am running AS7.0
I am just a novice user and am uncertain exactly what to do to  fix the problem.

Title: Re: stdlib.h: No such file or directory
Post by Visual Micro on Mar 12th, 2018 at 7:24pm
Please post the full build output as .txt file after enabling vMicro>compiler>verbose

Thanks

Title: Re: stdlib.h: No such file or directory
Post by Peter Wagstaff on Mar 12th, 2018 at 8:27pm
Hi, thanks for the reply, as I have this problem in all sketches I just compiled "Blink" to keep it short (ish) It was working fine 4 days ago and I have changed nothing (intentionally) and all my sketches compile OK in Arduino IDE

Peter


Code (]Compiling debug version of 'Blink' for 'Arduino Pro or Pro Mini w/ ATmega328P (3.3V, 8 MHz)'
Build folder: file:///C:/Users/peter/AppData/Local/Temp/VMBuilds/Blink/pro_8MHzatmega328
Additional Defines: VM_DEBUG;VM_DEBUG_ENABLE 1;VM_DEBUG_BANDWIDTH_THROTTLE_MS 50;VM_DEBUGGER_TYPE_HARDWARESERIAL 0;VM_DEBUGGER_TYPE_SOFTWARESERIAL 1;VM_DEBUGGER_TYPE_FASTSERIAL 2;VM_DEBUGGER_TYPE_USB 3;VM_DEBUGGER_TYPE_TEENSY 4;VM_DEBUGGER_TYPE_UART 5;VM_DEBUGGER_TYPE_USART 6;VM_DEBUGGER_TYPE_USBSERIAL 7;VM_DEBUGGER_TYPE_TTYUART 8;VM_DEBUGGER_TYPE_NET_CONSOLE 9;VM_DEBUGGER_TYPE_Uart 10;VM_DEBUGGER_TYPE_COSA 11;VM_DEBUGGER_TYPE_CDCSerialClass 12;VM_DEBUGGER_TYPE_HARDWARESERIAL1 13;VM_DEBUGGER_TYPE_HARDWARESERIAL2 14;VM_DEBUGGER_TYPE_HARDWARESERIAL3 15;VM_DEBUGGER_TYPE VM_DEBUGGER_TYPE_HARDWARESERIAL;VM_DEBUG_BREAKPAUSE;
Architecture Tools: C:\Users\peter\AppData\Roaming\arduino17\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino/bin/
GCC: 4.9.2
Sketchbook: file:\\\D:\Documents\Arduino
Sketch Include Paths
Core Include Paths
Include Path 'C:\Users\peter\AppData\Roaming\arduino17\packages\arduino\hardware\avr\1.6.21\cores\arduino'
Include Path 'C:\Users\peter\AppData\Roaming\arduino17\packages\arduino\hardware\avr\1.6.21\variants\eightanaloginputs'
"C:\Users\peter\AppData\Roaming\arduino17\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino\bin\avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=8000000L -DARDUINO=10805 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR -I"C:\Users\peter\AppData\Roaming\arduino17\packages\arduino\hardware\avr\1.6.21\cores\arduino" -I"C:\Users\peter\AppData\Roaming\arduino17\packages\arduino\hardware\avr\1.6.21\variants\eightanaloginputs" "C:\Users\peter\AppData\Local\Temp\VMBuilds\Blink\pro_8MHzatmega328\Blink.cpp" -o "nul"
"C:\Users\peter\AppData\Roaming\arduino17\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino\bin\avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=8000000L -DARDUINO=10805 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR -I"C:\Users\peter\AppData\Roaming\arduino17\packages\arduino\hardware\avr\1.6.21\cores\arduino" -I"C:\Users\peter\AppData\Roaming\arduino17\packages\arduino\hardware\avr\1.6.21\variants\eightanaloginputs" "C:\Users\peter\AppData\Local\Temp\VMBuilds\Blink\pro_8MHzatmega328\Blink.cpp" -o "nul"

Blink.ino: In file included from

arduino.h: 23:20: fatal error: stdlib.h: No such file or directory
   #include <stdlib.h>
   compilation terminated


     An error was encountered during the 'Deep Search' discovery process.
     Either resolve the error or switch off the 'Deep Search Includes' option.
     Tip: When deep search is switched off, headers must be #included in the [project_name.ino):

for all required libraries (for example: #include <SPI.h>)
     Tip: Deep search must be off if the project source contains links/shortcuts to code outside of the project structure. The source will have been #included using a relative path preceeded by ..\ (for example: #include "..\..\foo\foo.h")
Debug build failed for project 'Blink'

Title: Re: stdlib.h: No such file or directory
Post by Visual Micro on Mar 12th, 2018 at 10:21pm
Hi,

maybe you used board manager to update the avr tool chain.

Please delete this folder

C:\Users\peter\AppData\Roaming\arduino17\packages\arduino

Then restart the ide and try again.

Thanks


Title: Re: stdlib.h: No such file or directory
Post by Peter Wagstaff on Mar 13th, 2018 at 12:03am
Hi Tim, many thanks for your help, that fixed the problem and I would never have got there without you.

All the best
Peter

Title: Re: stdlib.h: No such file or directory
Post by Visual Micro on Mar 13th, 2018 at 1:24pm
Thanks, I will look at why this happened but I think that it is always better to upgrade arduino ide instead of using board manager to install AVR.

The reason for this is that the Arduino Ide includes a version of AVR, so you end up with two different versions to maintain if you also install AVR via board manager.

VS Arduino » Powered by YaBB 2.6.12!
YaBB Forum Software © 2000-2024. All Rights Reserved.