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 Compile error with libraries (Read 3974 times)
RubenPerez
Newbies
*
Offline


Posts: 2
Joined: Feb 27th, 2016
Compile error with libraries
Feb 27th, 2016 at 5:51pm
Print Post  
Hello, 
I am new user to Visual Micro that I have installed on VS 2015 Community and I start to prove some Arduino Apps over Intel Galileo 2 board. 

I can't compile anything that uses a library, but the same code works correctly with Arduino 1.6.7 editor, that compile and upload to device without problem. Also works correct without library (as the basic blink example).

With Visual Micro I always get from the compiler, that "fatal error: Wire.h: No such file or directory", (or Ethernet.h, or whatever library .h I use). 

The IDE recognizes the .h, so it can open it, and recognize the Intellisense, but nothing with the compiler. The libraries are present (as the Arduino IDE compile without problem).

There is the verbose output I receive from the last lines on compilation: 

Code (C++)
Select All
...
Core Include Paths
Include Path \cores\arduino'
Include Path \variants\galileo_fab_g'
Library Include Paths (1)
+"  -m32 -march=i586 ky-linux-uclibc\1.6.2+1.0/i586-poky-linux-uclibc" -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -D__ARDUINO_X86__ -Xassembler -mquark-strip-lock=yes -w -x c++ -E -CC -DF_CPU=-m32 -DARDUINO=10607 -DARDUINO_GALILEOGEN2 -DARDUINO_ARCH_I586        .0\cores\arduino" .0\variants\galileo_fab_g" -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\y1rpun5w.a4j\Micro Platforms\default\debuggers\VM_DBG" -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\y1rpun5w.a4j\Micro Platforms\default\debuggers" _izmir_fg\EjemploArduinoBlink.cpp" -o "nul"
All import libraries will be re-compiled
Build Core Paths: cores\arduino
Using library VM_DBG version 0.0.0 in folder C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\y1rpun5w.a4j\Micro Platforms\default\debuggers\VM_DBG
+" -m32 -march=i586 ky-linux-uclibc\1.6.2+1.0/i586-poky-linux-uclibc" -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -MMD -D__ARDUINO_X86__ -Xassembler -mquark-strip-lock=yes -march=i586 -m32 -DARDUINO=10607 .0\cores\arduino" .0\variants\galileo_fab_g" -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\y1rpun5w.a4j\Micro Platforms\default\debuggers\VM_DBG" -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\y1rpun5w.a4j\Micro Platforms\default\debuggers" -I"C:\Program Files (x86)\Arduino\libraries" .0\libraries" -I"C:\Users\ruperez\Documents\Arduino\libraries" "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\y1rpun5w.a4j\Micro Platforms\default\debuggers\VM_DBG\VM_DBG.cpp" -o _izmir_fg\VM_DBG\VM_DBG.cpp.o" -DVM_DEBUG -DVM_DEBUG_ENABLE=1 -DVM_DEBUG_BANDWIDTH_THROTTLE_MS=50 -DVM_DEBUGGER_TYPE_HARDWARESERIAL=0 -DVM_DEBUGGER_TYPE_SOFTWARESERIAL=1 -DVM_DEBUGGER_TYPE_FASTSERIAL=2 -DVM_DEBUGGER_TYPE_USB=3 -DVM_DEBUGGER_TYPE_TEENSY=4 -DVM_DEBUGGER_TYPE_UART=5 -DVM_DEBUGGER_TYPE_USART=6 -DVM_DEBUGGER_TYPE_USBSERIAL=7 -DVM_DEBUGGER_TYPE_TTYUART=8 -DVM_DEBUGGER_TYPE_NET_CONSOLE=9 -DVM_DEBUGGER_TYPE_Uart=10 -DVM_DEBUGGER_TYPE_COSA=11 -DVM_DEBUGGER_TYPE_CDCSerialClass=12 -DVM_DEBUGGER_TYPE=VM_DEBUGGER_TYPE_TTYUART -DVM_DEBUG_BREAKPAUSE
+" -m32 -march=i586 ky-linux-uclibc\1.6.2+1.0/i586-poky-linux-uclibc" -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -MMD -D__ARDUINO_X86__ -Xassembler -mquark-strip-lock=yes -march=i586 -m32 -DARDUINO=10607 .0\cores\arduino" .0\variants\galileo_fab_g" -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\y1rpun5w.a4j\Micro Platforms\default\debuggers\VM_DBG" -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\y1rpun5w.a4j\Micro Platforms\default\debuggers" -I"C:\Program Files (x86)\Arduino\libraries" .0\libraries" -I"C:\Users\ruperez\Documents\Arduino\libraries" _izmir_fg\EjemploArduinoBlink.cpp" -o _izmir_fg\EjemploArduinoBlink.cpp.o" -DVM_DEBUG -DVM_DEBUG_ENABLE=1 -DVM_DEBUG_BANDWIDTH_THROTTLE_MS=50 -DVM_DEBUGGER_TYPE_HARDWARESERIAL=0 -DVM_DEBUGGER_TYPE_SOFTWARESERIAL=1 -DVM_DEBUGGER_TYPE_FASTSERIAL=2 -DVM_DEBUGGER_TYPE_USB=3 -DVM_DEBUGGER_TYPE_TEENSY=4 -DVM_DEBUGGER_TYPE_UART=5 -DVM_DEBUGGER_TYPE_USART=6 -DVM_DEBUGGER_TYPE_USBSERIAL=7 -DVM_DEBUGGER_TYPE_TTYUART=8 -DVM_DEBUGGER_TYPE_NET_CONSOLE=9 -DVM_DEBUGGER_TYPE_Uart=10 -DVM_DEBUGGER_TYPE_COSA=11 -DVM_DEBUGGER_TYPE_CDCSerialClass=12 -DVM_DEBUGGER_TYPE=VM_DEBUGGER_TYPE_TTYUART -DVM_DEBUG_BREAKPAUSE
EjemploArduinoBlink.ino:3:18: fatal error: Wire.h: No such file or directory
:compilation terminated
Error compiling project sources
 



Thanks very much in advance. 

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compile error with libraries
Reply #1 - Feb 27th, 2016 at 5:59pm
Print Post  
Thanks for the report.

Please switch off "Visual Micro>Deep search includes" and it will work.

Hopefully this can be addressed in the next release. 

By switching the option off, Visual Micro resolves libraries in the same way as the arduino did prior to the end of last year. This  means any libraries you want to use must be #included in the [project name].ino (which is what you have done anyway)
« Last Edit: Feb 27th, 2016 at 5:59pm by Tim@Visual Micro »  
Back to top
IP Logged
 
RubenPerez
Newbies
*
Offline


Posts: 2
Joined: Feb 27th, 2016
Re: Compile error with libraries
Reply #2 - Feb 28th, 2016 at 6:35pm
Print Post  
Thanks very much, very fast and good answer, it works now.

Ruben
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint