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) Why does this not compile (Read 10978 times)
Jan Friberg
Junior Member
**
Offline


Posts: 72
Joined: Dec 13th, 2013
Why does this not compile
Aug 14th, 2016 at 5:41pm
Print Post  
In a program for an Arduino Uno I have this included (I use Visual Micro studio)
Code (C++)
Select All
#include <Wire.h>
#include <LiquidCrystal_SR3W.h>
#include <LiquidCrystal_SR2W.h>
#include <LiquidCrystal_SR.h>
#include <LiquidCrystal_I2C.h>
#include <LCD.h>
#include <I2CIO.h>
#include <FastIO.h>
 


And it complies without problem.
When trying this program on a Arduino Duo I have exactly the same include lines as above and I have included them from the Add Library menu and it result in this compiler error message

Compiling debug version of 'DueMottagare' for 'Arduino Due (Programming Port)'
I2CIO.cpp:35:26: fatal error: ..\Wire\Wire.h: No such file or directory
:#include <..\Wire\Wire.h>
:compilation terminated
Error compiling libraries


Strange thing is that it has compiled before I think. I'm without a clue to what the problem is. The two projects are in the same root folder where I also have a directory folder called libraries with the user libraries
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Why does this not compile
Reply #1 - Aug 14th, 2016 at 5:51pm
Print Post  
There has been some arduino library structure changes

I need to do some testing to be sure of a solution so links to the libraries would help.

Maybe try removing the "..\Wire" from I2CIO.cpp and any other files that have "..\Wire\Wire.h" because the path qualifier isn't required. I would also change the "quotes" to chevrons #include <Wire.h>
  
Back to top
IP Logged
 
Jan Friberg
Junior Member
**
Offline


Posts: 72
Joined: Dec 13th, 2013
Re: Why does this not compile
Reply #2 - Aug 14th, 2016 at 6:07pm
Print Post  
Tim@Visual Micro wrote on Aug 14th, 2016 at 5:51pm:
There has been some arduino library structure changes

I need to do some testing to be sure of a solution so links to the libraries would help.

Maybe try removing the "..\Wire" from I2CIO.cpp and any other files that have "..\Wire\Wire.h" because the path qualifier isn't required. I would also change the "quotes" to chevrons #include <Wire.h>


Here is a link to the website for the libraries I'm trying to use
https://arduino-info.wikispaces.com/LCD-Blue-I2C

I tried removing the ..\Wire" from I2CIO.cpp but that generated other compiler errors. The line seem to be needed
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Why does this not compile
Reply #3 - Aug 14th, 2016 at 6:15pm
Print Post  
Did you replace the quotes with chevrons?
  
Back to top
IP Logged
 
Jan Friberg
Junior Member
**
Offline


Posts: 72
Joined: Dec 13th, 2013
Re: Why does this not compile
Reply #4 - Aug 14th, 2016 at 7:15pm
Print Post  
Tim@Visual Micro wrote on Aug 14th, 2016 at 6:15pm:
Did you replace the quotes with chevrons?


Tried now and the result was this compiler error

Compiling debug version of 'DueMottagare' for 'Arduino Due (Programming Port)'
Unknown error during deep search source code for includes. Attempting alternative regex exploration
System.Exception: Multiple attempts were made to resolve the same include path
   at UntilDone(String sourceFilePath, Board brd, List`1 includePaths)
   at UntilDone(String sourceFilePath, Board brd, List`1 includePaths)
   at ntilDone(String sourceFilePath, Board brd, List`1 includePaths)
   at Visual.Micro.MiroAppAPI.SketchCompilerArduino._compile(SketchBuilder lsketch, String primaryClassName, Boolean verbose, Boolean isDebug)
I2CIO.cpp:35:23: fatal error: Wire\Wire.h: No such file or directory
:#include <Wire\Wire.h>
:compilation terminated
Error compiling libraries

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Why does this not compile
Reply #5 - Aug 14th, 2016 at 7:30pm
Print Post  
Thanks

I think the test should be

#include <Wire.h>

not

#include <Wire\Wire.h>

Smiley
  
Back to top
IP Logged
 
Jan Friberg
Junior Member
**
Offline


Posts: 72
Joined: Dec 13th, 2013
Re: Why does this not compile
Reply #6 - Aug 15th, 2016 at 10:17am
Print Post  
Tim@Visual Micro wrote on Aug 14th, 2016 at 7:30pm:
Thanks

I think the test should be

#include <Wire.h>

not

#include <Wire\Wire.h>

Smiley


Now I was able to compile but encounter this weird error for the upload

Compiling debug version of 'DueMottagare' for 'Arduino Due (Programming Port)'
Binary sketch size: 27 732 bytes (used 5% of a 524 288 byte maximum) (4,07 secs)
 
Uploading to I/O board using 'COM3'
Upload failed
bossac.exe: extra arguments found
Try 'bossac.exe -h' or 'bossac.exe --help' for more information
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Why does this not compile
Reply #7 - Aug 15th, 2016 at 1:36pm
Print Post  
That just means you have upgraded Arduino or core. That it has new properties. That you have not upgraded visual micro.

Which version of visual.micro are you using in tools options extensions and updates?
  
Back to top
IP Logged
 
Jan Friberg
Junior Member
**
Offline


Posts: 72
Joined: Dec 13th, 2013
Re: Why does this not compile
Reply #8 - Aug 15th, 2016 at 3:22pm
Print Post  
Tim@Visual Micro wrote on Aug 15th, 2016 at 1:36pm:
That just means you have upgraded Arduino or core. That it has new properties. That you have not upgraded visual micro.

Which version of visual.micro are you using in tools options extensions and updates?


Under Options Visual Micro versions I see this info

Version 1.1601.11
Version minor 3
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Why does this not compile
Reply #9 - Aug 15th, 2016 at 3:36pm
Print Post  
Okay well if you can't look at tools extensions and updates then maybe just tell me when you last upgraded vidual micro

Admin: Jan has confirmed all working after updating Visual Micro. Please always updated Visual Micro if you update the Arduino IDE or toolchains. New build properties can't be known in advance and might not exist in older versions of Visual Micro.
« Last Edit: Aug 18th, 2016 at 8:48pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Why does this not compile
Reply #10 - Sep 2nd, 2016 at 2:51pm
Print Post  
Visual Micro now supports Segger debug of the Due in Atmel Studio

Notice we can use .cpp instead of .ino files. The .cpp must contain the same code as the master .ino (setup() loop() and #include "Arduino.h". 

A project_name.ino must exist in the project but it can be empty and is not compiled when a .cpp exists
« Last Edit: Sep 2nd, 2016 at 2:54pm by Tim@Visual Micro »  

Please Register or Login to the Forum to see File Attachments
Back to top
IP Logged
 
Syed Zain Nasir
Newbies
*
Offline


Posts: 1
Joined: Oct 4th, 2016
Re: Why does this not compile
Reply #11 - Oct 4th, 2016 at 2:23am
Print Post  
Thanks for the images, really helping tutorial.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint