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) LCD I2C compiling error (Read 26437 times)
THX_RoG
Junior Member
**
Offline


Posts: 27
Location: Germany
Joined: Nov 3rd, 2012
LCD I2C compiling error
Jun 21st, 2013 at 2:53pm
Print Post  
sup guys have a little problem compiling my sketch 
here my code 
Code
Select All
#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x38,20,4);  // set the LCD address to 0x38 for a 20 chars and 4 line display

void setup()
{
  lcd.init();                      // initialize the lcd

  // Print a message to the LCD.
  lcd.backlight();
  lcd.print("Hello, world!");
}

void loop()
{

}
 


and i get this error 
Code
Select All
Compiling 'LCD_DHT11' for 'Arduino Uno'
LCD_DHT11.ino : invalid conversion from 'int' to 't_backlighPol'
LCD_DHT11.ino : LiquidCrystal_I2C(uint8_t, uint8_t, t_backlighPol)'
LiquidCrystal_I2C.h : : In function 'void setup()':
LiquidCrystal_I2C.h : init()' is private
LCD_DHT11.ino : within this context
Error compiling
 


with arduino its compiling without any issues
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12168
Location: United Kingdom
Joined: Apr 10th, 2010
Re: LCD I2C compiling error
Reply #1 - Jun 21st, 2013 at 3:01pm
Print Post  
Hi, 

Which version of Arduino is Visual Micro pointing to? (see tools>options)
Which version of Visual Micro is installed? (see tools>options)
Which version of Visual Studio or Atmel Studio are you using?

Thanks
« Last Edit: Jun 21st, 2013 at 3:11pm by Tim@Visual Micro »  
Back to top
IP Logged
 
THX_RoG
Junior Member
**
Offline


Posts: 27
Location: Germany
Joined: Nov 3rd, 2012
Re: LCD I2C compiling error
Reply #2 - Jun 22nd, 2013 at 8:39am
Print Post  
Code
Select All
Which version of Arduino is Visual Micro pointing to? (see tools>options) 


im using arduino 1.0.5

Code
Select All
Which version of Visual Micro is installed? (see tools>options) 


VM version 1.1305.09

Code
Select All
Which version of Visual Studio or Atmel Studio are you using? 


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


Posts: 12168
Location: United Kingdom
Joined: Apr 10th, 2010
Re: LCD I2C compiling error
Reply #3 - Jun 22nd, 2013 at 10:59am
Print Post  
Hi,

Please delete the robot_control and robot_motor libraries that are installed in ardunoIDE\Libraries then either restart vs/atmel o click Tools>Arduino>reload Toolchain.

We currently recommend either arduino 1.0.4 or 1.5.2 because of the problem these two libs cause in 1.0.5. There will be a new version of vm shortly that works the slightly new way that Arduino 1.0.5 works Smiley

Thanks for the info

  
Back to top
IP Logged
 
THX_RoG
Junior Member
**
Offline


Posts: 27
Location: Germany
Joined: Nov 3rd, 2012
Re: LCD I2C compiling error
Reply #4 - Jun 22nd, 2013 at 8:06pm
Print Post  
i was on 1.0.4 and i update arduino to 1.0.5 and the problem is the same i delete the lib and aditionaly the included in arduino libe LiquidCrystal but the problem is the same
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12168
Location: United Kingdom
Joined: Apr 10th, 2010
Re: LCD I2C compiling error
Reply #5 - Jun 22nd, 2013 at 8:46pm
Print Post  
Thanks for the info,

1.0.4 was fine, my concern was only that 1.0.5 has thrown some errors when those libs are present.

Would you please switch on tools>Options>visual micro>compiler>verbose and copy the output into an email to info [at] visualmicro.com

Thanks
  
Back to top
IP Logged
 
THX_RoG
Junior Member
**
Offline


Posts: 27
Location: Germany
Joined: Nov 3rd, 2012
Re: LCD I2C compiling error
Reply #6 - Jun 23rd, 2013 at 7:51am
Print Post  
ok done i send u the verbose and my code to
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12168
Location: United Kingdom
Joined: Apr 10th, 2010
Re: LCD I2C compiling error
Reply #7 - Jun 23rd, 2013 at 11:41am
Print Post  
Yes great report thanks, both code and build process

Sorry to be a pain but would you mind opening Arduino, switch on "File>Preferences>Compile Verbose" then build the same project.

I the build you sent me looks good but I notice that the LiquidCrystal_I2C is in a library folder called LiquidCrystal. I am wondering if Vm is confused with the LiquidCrystal lib that is installed with Arduino by default.

As it happens the lib system is currently being overhauled to also work with the new Arduino 1.5.3 format that is about to be released. So if we have confusion with lib names it will soon be fixed.

In the meantime, when I see how Arduino is working on your system I should be able to give you a simple workaround.

Thanks very much
  
Back to top
IP Logged
 
THX_RoG
Junior Member
**
Offline


Posts: 27
Location: Germany
Joined: Nov 3rd, 2012
Re: LCD I2C compiling error
Reply #8 - Jun 23rd, 2013 at 6:00pm
Print Post  
ok i send it to u and arduino dont makes any problem i copy the LiquidCrystal lib from arduino's folder to my sketch folder
\Arduino\libraries and tested in VS and the same problem 
i try to update the arduino main libraries and try to compile it in arduino and its going without any issues 
so the VM plug-in in VS is making a problem
« Last Edit: Jun 23rd, 2013 at 6:01pm by THX_RoG »  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12168
Location: United Kingdom
Joined: Apr 10th, 2010
Re: LCD I2C compiling error
Reply #9 - Jun 23rd, 2013 at 6:03pm
Print Post  
Thanks for the output from Arduino

Visual micro is getting confused with LiquidCrystal library files names. In this case your "sketchbookFolder\Libraries" list contains both LiquidCrystal libraries and LiquidCrystal_I2C. 

There are probably some commonly named files within these two lib folders. 

The LiquidCrystal library is part of the Arduino Ide core libraries so can be removed from your sketchBook\Libraries folder (dropbox/arduino/libraries),at least until the next release of Visual Micro

Hope this fixes it, any problems please click "Build>Clean Solution", thanks
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12168
Location: United Kingdom
Joined: Apr 10th, 2010
Re: LCD I2C compiling error
Reply #10 - Jun 23rd, 2013 at 6:12pm
Print Post  
As a "test" of the problem... Please remove the LiquidCrystal from the SketchBook\Libraries and also from Arduino\Libraries.

Thank you
« Last Edit: Jun 23rd, 2013 at 6:12pm by Tim@Visual Micro »  
Back to top
IP Logged
 
THX_RoG
Junior Member
**
Offline


Posts: 27
Location: Germany
Joined: Nov 3rd, 2012
Re: LCD I2C compiling error
Reply #11 - Jun 23rd, 2013 at 6:33pm
Print Post  
haha it worked and found the problem, i have 2 LiquidCrystal_I2C Libraries 
one in folder called LiquidCrystal_I2C and other in LiquidCrystal
any whey thx for such quick respond  

edit: by admin to help other members
« Last Edit: Jun 23rd, 2013 at 7:04pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12168
Location: United Kingdom
Joined: Apr 10th, 2010
Re: LCD I2C compiling error
Reply #12 - Jun 23rd, 2013 at 7:01pm
Print Post  
Great thanks for the update.

Makes sense now, Visual Micro is sorting libs in different order so might show different symptoms. Anyway the sorting is being addressed in the next release so if anyone else makes that mistake it might not break so easily Smiley

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


Posts: 12168
Location: United Kingdom
Joined: Apr 10th, 2010
Re: LCD I2C compiling error
Reply #13 - Aug 18th, 2013 at 10:40pm
Print Post  
In the latest release 1308.18 the libraries in the sketchbook folder take priority over the libraries in the Arduino Ide folder.

More info

This problem is inherent in the current Arduino design because we only ever #include libraries using file names (no paths). Therefore if two libraries contain a .h file of the same name there can be confusion and one librray has to be automatically ignored by Visual Micro. In previous versions of Visual Micro the ide libraries had priority which is why the wrong Liquidcrystal library was included.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint