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
Hot Topic (More than 8 Replies) Problem finding .h files and libraries (Read 15893 times)
bowzee
Junior Member
**
Offline


Posts: 20
Joined: Jun 11th, 2015
Problem finding .h files and libraries
Jun 27th, 2016 at 3:36pm
Print Post  
I have a bunch of .h files, after the latest updates (Atmel Studio and Visual Micro) they can't be found anymore

Code
Select All
Compiling 'sketch_mar22a' for 'Arduino Due (Programming Port)'
sketch_mar22a.ino:In file included from
FIFO.h:5:29: fatal error: DueFlashStorage.h: No such file or directory
:#include <DueFlashStorage.h>
:compilation terminated
Error compiling project sources 

  
Back to top
 
IP Logged
 
bowzee
Junior Member
**
Offline


Posts: 20
Joined: Jun 11th, 2015
Re: Problem finding .h files and libraries
Reply #1 - Jun 27th, 2016 at 3:41pm
Print Post  
Oh, and this is what happens with the deep scanning:

Code
Select All
Compiling 'sketch_mar22a' for 'Arduino Due (Programming Port)'

In file included from sketch_mar22a.cpp:4:0:
FIFO.h:5:29: fatal error: DueFlashStorage.h: No such file or directory
 #include <DueFlashStorage.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")
 

  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Problem finding .h files and libraries
Reply #2 - Jun 27th, 2016 at 3:41pm
Print Post  
Hi,

Please confirm which version of atmel studio and arduino you are using.

Also switch on both "Verbose" and "Show build properties"  then build and post or email the output to info[at]visualmicro.com

EDIT: Please also confirm that you have not altered the sketchbook location in the Ide locations config window. The location determines where user libraries are installed because the error message suggests the <DueFlashStorage.h> library can't be found.

Thanks
« Last Edit: Jun 27th, 2016 at 4:01pm by Tim@Visual Micro »  
Back to top
IP Logged
 
bowzee
Junior Member
**
Offline


Posts: 20
Joined: Jun 11th, 2015
Re: Problem finding .h files and libraries
Reply #3 - Jun 27th, 2016 at 4:04pm
Print Post  
Atmel Studio: 7.0.1006
Arduino IDE for Atmel Studio 7 - 1606.17.5
Arduino IDE: 1.6.7

With verbose the output exceeds the maximum, so I cut "the middle" part out:

Code
Select All
Compiling 'sketch_mar22a' for 'Arduino Due (Programming Port)'
Build folder: e_x_dbg
Summary: Header=1 Prototypes=4 Imports=1
Additional Defines:
Architecture Tools: \4.8.3-2014q1/bin/
Sketchbook: file:\\\d:\Users\bowzee\Documents\Arduino
Sketch Include Paths
Include Path 'D:\Users\bowzee\Documents\Arduino\sketch_mar22a'
Core Include Paths
Include Path es\arduino'
Include Path iants\arduino_due_x'
Library Include Paths (1)
Include Path raries\SPI\src'
All import libraries will be re-compiled
Build Core Paths: s\arduino
c\4.8.3-2014q1/bin/arm-none-eabi-gcc" -c -g -x assembler-with-cpp -mcpu=cortex-m3 -mthumb -DF_CPU=84000000L -DARDUINO=10607 -DARDUINO_SAM_DUE -DARDUINO_ARCH_SAM -D__SAM3X8E__ -mthumb -DUSB_VID=0x2341 -DUSB_PID=0x003e -DUSBCON -DUSB_MANUFACTURER="\"Arduino LLC\"" -DUSB_PRODUCT="\"Arduino Due\"" ystem/libsam" ystem/CMSIS/CMSIS/Include/" ystem/CMSIS/Device/ATMEL/" ores\arduino" ariants\arduino_due_x" es\arduino\wiring_pulse_asm.S" -o \core\wiring_pulse_asm.S.o" 
c\4.8.3-2014q1/bin/arm-none-eabi-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -Dprintf=iprintf -MMD -mcpu=cortex-m3 -mthumb -DF_CPU=84000000L -DARDUINO=10607 -DARDUINO_SAM_DUE -DARDUINO_ARCH_SAM -D__SAM3X8E__ -mthumb -DUSB_VID=0x2341 -DUSB_PID=0x003e -DUSBCON -DUSB_MANUFACTURER="\"Arduino LLC\"" -DUSB_PRODUCT="\"Arduino Due\"" ystem/libsam" ystem/CMSIS/CMSIS/Include/" ystem/CMSIS/Device/ATMEL/" ores\arduino" ariants\arduino_due_x" es\arduino\cortex_handlers.c" -o \core\cortex_handlers.c.o" 


...

Code
Select All
c\4.8.3-2014q1/bin/arm-none-eabi-ar" rcs \core.a" \core\variant.cpp.o"
Using library SPI version 1.0 in folder aries\SPI
c\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf -MMD -mcpu=cortex-m3 -mthumb -DF_CPU=84000000L -DARDUINO=10607 -DARDUINO_SAM_DUE -DARDUINO_ARCH_SAM -D__SAM3X8E__ -mthumb -DUSB_VID=0x2341 -DUSB_PID=0x003e -DUSBCON -DUSB_MANUFACTURER="\"Arduino LLC\"" -DUSB_PRODUCT="\"Arduino Due\"" ystem/libsam" ystem/CMSIS/CMSIS/Include/" ystem/CMSIS/Device/ATMEL/" ores\arduino" ariants\arduino_due_x" ibraries\SPI\src" -I"C:\Program Files (x86)\Arduino\libraries" ibraries" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Extensions\ym0zu4af.zzf\Micro Platforms\default\debuggers" -I"d:\Users\bowzee\Documents\Arduino\libraries" raries\SPI\src\SPI.cpp" -o \SPI\SPI.cpp.o"
c\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf -MMD -mcpu=cortex-m3 -mthumb -DF_CPU=84000000L -DARDUINO=10607 -DARDUINO_SAM_DUE -DARDUINO_ARCH_SAM -D__SAM3X8E__ -mthumb -DUSB_VID=0x2341 -DUSB_PID=0x003e -DUSBCON -DUSB_MANUFACTURER="\"Arduino LLC\"" -DUSB_PRODUCT="\"Arduino Due\"" ystem/libsam" ystem/CMSIS/CMSIS/Include/" ystem/CMSIS/Device/ATMEL/" ores\arduino" ariants\arduino_due_x" ibraries\SPI\src" -I"C:\Program Files (x86)\Arduino\libraries" ibraries" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Extensions\ym0zu4af.zzf\Micro Platforms\default\debuggers" -I"d:\Users\bowzee\Documents\Arduino\libraries" \sketch_mar22a.cpp" -o \sketch_mar22a.cpp.o"
sketch_mar22a.ino:In file included from
FIFO.h:5:29: fatal error: DueFlashStorage.h: No such file or directory
:#include <DueFlashStorage.h>
:compilation terminated
Error compiling project sources
 

  
Back to top
 
IP Logged
 
bowzee
Junior Member
**
Offline


Posts: 20
Joined: Jun 11th, 2015
Re: Problem finding .h files and libraries
Reply #4 - Jun 27th, 2016 at 4:08pm
Print Post  
I tried with and without altering the sketchbook location, currently it is d:\Users\bowzee\Documents\Arduino

Maybe I should send all of this over via e-mail because it is too big
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Problem finding .h files and libraries
Reply #5 - Jun 27th, 2016 at 4:08pm
Print Post  
Thanks, please attach as a .txt file using the "Choose File" option below the edit window when editing a message.

Can you also confirm that you have installed the library into "d:\Users\bowzee\Documents\Arduino\Libraries"?
  
Back to top
IP Logged
 
bowzee
Junior Member
**
Offline


Posts: 20
Joined: Jun 11th, 2015
Re: Problem finding .h files and libraries
Reply #6 - Jun 27th, 2016 at 4:17pm
Print Post  
I have attached the file as txt. Right now it will not find that particular library, which is in the library directory, but it will not find any other .h file either if I comment the corresponding line

Code (C++)
Select All
#include <DueFlashStorage.h> 

« Last Edit: Jun 27th, 2016 at 4:24pm by bowzee »  
Back to top
 
IP Logged
 
bowzee
Junior Member
**
Offline


Posts: 20
Joined: Jun 11th, 2015
Re: Problem finding .h files and libraries
Reply #7 - Jun 27th, 2016 at 4:19pm
Print Post  
not sure if the txt got attached, retrying
  

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Problem finding .h files and libraries
Reply #8 - Jun 27th, 2016 at 4:28pm
Print Post  
I got it thanks. It's strange it doesn't always appear!

Okay couple of things to confirm/do:-

1) Delete the main.cpp that atmel studio has added to your project. The next release of visual micro tells you to do this when it finds the file.

2) Delete the Device_Startup folder that atmel studio has added to your project.

These files will be a problem even if not the problem right now. It's annoying that atmel studio 7 adds these files automatically!!

3) Confirm that you have the following folder D:\Users\bowzee\Documents\Arduino\Libraries\DueFlashStorage

4) Open the arduino 1.6.7 IDE and switch on "file>preferences>verbose compile". then build the project and post the output as .txt

Thanks

« Last Edit: Jun 27th, 2016 at 4:28pm by Tim@Visual Micro »  
Back to top
IP Logged
 
bowzee
Junior Member
**
Offline


Posts: 20
Joined: Jun 11th, 2015
Re: Problem finding .h files and libraries
Reply #9 - Jun 27th, 2016 at 4:33pm
Print Post  
D:\Users\bowzee\Documents\Arduino\libraries>dir
Volume in drive D is bowzee
Volume Serial Number is A84A-3AAG

Directory of D:\Users\bowzee\Documents\Arduino\libraries

06/26/2016  11:26 PM    <DIR>          .
06/26/2016  11:26 PM    <DIR>          ..
07/01/2015  01:23 PM    <DIR>          Adafruit_Fingerprint_Due
02/10/2016  10:51 AM    <DIR>          Audio
06/26/2016  11:28 PM    <DIR>          DueFlashStorage
02/10/2016  10:52 AM    <DIR>          DueTimer
02/10/2016  10:52 AM    <DIR>          EnableInterrupt
02/10/2016  10:51 AM    <DIR>          Firmata
05/30/2016  09:56 PM    <DIR>          LiquidCrystal_I2C
06/06/2015  08:42 AM                83 readme.txt
02/10/2016  10:52 AM    <DIR>          Scheduler
02/10/2016  10:52 AM    <DIR>          USBHost
               1 File(s)             83 bytes
              11 Dir(s)   8,774,688,768 bytes free

D:\Users\bowzee\Documents\Arduino\libraries>
  
Back to top
 
IP Logged
 
bowzee
Junior Member
**
Offline


Posts: 20
Joined: Jun 11th, 2015
Re: Problem finding .h files and libraries
Reply #10 - Jun 27th, 2016 at 4:46pm
Print Post  
Wow, now I am not sure that this is even related to Visual Micro... From Arduino IDE, it can't find a different file but the source code is the same:

Code
Select All
C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware "C:\Program Files (x86)\Arduino\hardware" -hardware "d:\Users\bowzee\AppData\Local\Arduino15\packages" -tools "C:\Program Files (x86)\Arduino\tools-builder" -tools "C:\Program Files (x86)\Arduino\hardware\tools\avr" -tools "d:\Users\bowzee\AppData\Local\Arduino15\packages" -built-in-libraries "C:\Program Files (x86)\Arduino\libraries" -libraries "d:\Users\bowzee\Documents\Arduino\libraries" -fqbn=arduino:sam:arduino_due_x_dbg -ide-version=10607 -build-path "d:\Users\bowzee\AppData\Local\Temp\build5cdd314153e87e356df221e123f63aa0.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "d:\Users\bowzee\Documents\Arduino\sketch_mar22a\sketch_mar22a.ino"
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware "C:\Program Files (x86)\Arduino\hardware" -hardware "d:\Users\bowzee\AppData\Local\Arduino15\packages" -tools "C:\Program Files (x86)\Arduino\tools-builder" -tools "C:\Program Files (x86)\Arduino\hardware\tools\avr" -tools "d:\Users\bowzee\AppData\Local\Arduino15\packages" -built-in-libraries "C:\Program Files (x86)\Arduino\libraries" -libraries "d:\Users\bowzee\Documents\Arduino\libraries" -fqbn=arduino:sam:arduino_due_x_dbg -ide-version=10607 -build-path "d:\Users\bowzee\AppData\Local\Temp\build5cdd314153e87e356df221e123f63aa0.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "d:\Users\bowzee\Documents\Arduino\sketch_mar22a\sketch_mar22a.ino"
c\4.8.3-2014q1/bin/arm-none-eabi-g++"  -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf  -w -x c++ -E -CC -DF_CPU=84000000L -DARDUINO=10607 -DARDUINO_SAM_DUE -DARDUINO_ARCH_SAM  -D__SAM3X8E__ -mthumb -DUSB_VID=0x2341 -DUSB_PID=0x003e -DUSBCON '-DUSB_MANUFACTURER="Arduino LLC"' '-DUSB_PRODUCT="Arduino Due"'    ystem/libsam" ystem/CMSIS/CMSIS/Include/" ystem/CMSIS/Device/ATMEL/"  \cores\arduino" ariants\arduino_due_x" etch\sketch_mar22a.ino.cpp" -o "nul"
c\4.8.3-2014q1/bin/arm-none-eabi-g++"  -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf  -w -x c++ -E -CC -DF_CPU=84000000L -DARDUINO=10607 -DARDUINO_SAM_DUE -DARDUINO_ARCH_SAM  -D__SAM3X8E__ -mthumb -DUSB_VID=0x2341 -DUSB_PID=0x003e -DUSBCON '-DUSB_MANUFACTURER="Arduino LLC"' '-DUSB_PRODUCT="Arduino Due"'    ystem/libsam" ystem/CMSIS/CMSIS/Include/" ystem/CMSIS/Device/ATMEL/"  \cores\arduino" ariants\arduino_due_x" "-Id:\Users\bowzee\Documents\Arduino\libraries\DueFlashStorage\src" etch\sketch_mar22a.ino.cpp" -o "nul"
c\4.8.3-2014q1/bin/arm-none-eabi-g++"  -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf  -w -x c++ -E -CC -DF_CPU=84000000L -DARDUINO=10607 -DARDUINO_SAM_DUE -DARDUINO_ARCH_SAM  -D__SAM3X8E__ -mthumb -DUSB_VID=0x2341 -DUSB_PID=0x003e -DUSBCON '-DUSB_MANUFACTURER="Arduino LLC"' '-DUSB_PRODUCT="Arduino Due"'    ystem/libsam" ystem/CMSIS/CMSIS/Include/" ystem/CMSIS/Device/ATMEL/"  \cores\arduino" ariants\arduino_due_x" "-Id:\Users\bowzee\Documents\Arduino\libraries\DueFlashStorage\src" etch\sketch_mar22a.ino.cpp" -o eproc\ctags_target_for_gcc_minus_e.cpp"
In file included from d:\Users\bowzee\Documents\Arduino\sketch_mar22a\sketch_mar22a.ino:3:0:

tch\FIFO.h:9:21: fatal error: filters.h: No such file or directory

 #include <filters.h>

                     ^

compilation terminated.

Using library DueFlashStorage at version 1.0.0 in folder: d:\Users\bowzee\Documents\Arduino\libraries\DueFlashStorage
exit status 1
Error compiling.
 



Should I uninstall/reinstall Arduino IDE, Atmel Studio and Visual Micro?
  
Back to top
 
IP Logged
 
bowzee
Junior Member
**
Offline


Posts: 20
Joined: Jun 11th, 2015
Re: Problem finding .h files and libraries
Reply #11 - Jun 27th, 2016 at 4:50pm
Print Post  
This is the source code for that part:

Code (C++)
Select All
#include <Arduino.h>
#include <DueFlashStorage.h>
#define EEsize 524288
#include <bitset>
#include <bits/algorithmfwd.h>
#include <filters.h>
... 

  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Problem finding .h files and libraries
Reply #12 - Jun 27th, 2016 at 4:51pm
Print Post  
Yes I thought so. Something the FIFO.h is doing.

Can you zip and email your project? It will be private and deleted after the testing.
  
Back to top
IP Logged
 
bowzee
Junior Member
**
Offline


Posts: 20
Joined: Jun 11th, 2015
Re: Problem finding .h files and libraries
Reply #13 - Jun 27th, 2016 at 5:01pm
Print Post  
I really, really can't send the project over... I would probably get mega fired and mega sued...

The code was working before the updates, so I guess that by uninstalling and reinstalling everything the defaults might be restored. Because this is going to take hours, I will have to do this later.

Thanks for the help!
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Problem finding .h files and libraries
Reply #14 - Jun 27th, 2016 at 5:10pm
Print Post  
Understood thanks for the update.

A few things that might help

1) Make sure the lib #includes are in the project_name.ino file not just in cpp files.
2) Create a new project and test your libraries #includes compile okay without the sources of your project
3) Did you recently update to Arduino 1.6.7? If so be aware that code in sub folders (of the project) is discovered and compiled when in earlier versions it was not.

I can't think that much can be wrong. The fact that both Ide's can not discover libraries is strange. Maybe check that the library contains the source code files.

  
Back to top
IP Logged
 
bowzee
Junior Member
**
Offline


Posts: 20
Joined: Jun 11th, 2015
Re: Problem finding .h files and libraries
Reply #15 - Jun 27th, 2016 at 5:13pm
Print Post  
Again thanks, I will follow your recommendations.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Problem finding .h files and libraries
Reply #16 - Jun 27th, 2016 at 5:16pm
Print Post  
and make sure you delete the atmel studio main.cpp and device_startup folder that it will have created under your project. I mentioned them earlier hopefully you spotted that note.
  
Back to top
IP Logged
 
bowzee
Junior Member
**
Offline


Posts: 20
Joined: Jun 11th, 2015
Re: Problem finding .h files and libraries
Reply #17 - Jun 27th, 2016 at 8:16pm
Print Post  
I reinstalled Arduino IDE, Atmel studio and Visual Micro (through Atmel Studio) and now everything compiles... 

It seems as if the updates modified something but now this got fixed.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Problem finding .h files and libraries
Reply #18 - Jun 27th, 2016 at 8:23pm
Print Post  
I suspect it was related to the Arduino IDE. Visual Micro and Atmel Studio don't change any Arduino files so the common factor is the Arduino IDE config.

Thanks for letting me know.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint