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) Error compiling when using VS 2012 (Read 9978 times)
Rick Burns
Newbies
*
Offline


Posts: 7
Joined: Feb 26th, 2013
Error compiling when using VS 2012
Feb 28th, 2013 at 6:40am
Print Post  
When I compile my sketch inside the Arduino ide there are no errors but when I try to compile in VS2012 using the 'Local Windows Debugger' I get the following errors which seem to be inside the RS3232RTC library.

I am new to Arduino and or the 'C' language so I would appreciate any help available.

Thanks,

Rick Burns.

-------------------------------------------
Compiling 'Rick_LCD_1' for 'Arduino Uno'
Rick_LCD_1.ino : In file included from
DS3232RTC.h : expected class-name before '{' token
DS3232RTC.h : expected unqualified-id before 'public'
DS3232RTC.h : 'string' does not name a type
DS3232RTC.h : 'string' does not name a type
Rick_LCD_1.ino : DS3232RTC(SoftI2C&)'
DS3232RTC.h : DS3232RTC()
DS3232RTC.h : DS3232RTC(const DS3232RTC&)
DS3232RTC.h : : In function 'void loop()':
DS3232RTC.h : readTime(RTCTime*)' is private
Rick_LCD_1.ino : within this context
DS3232RTC.h : readDate(RTCDate*)' is private
Rick_LCD_1.ino : within this context
DS3232RTC.h : readTemperature()' is private
Rick_LCD_1.ino : within this context
DS3232RTC.cpp : In file included from
DS3232RTC.h : expected class-name before '{' token
DS3232RTC.h : expected unqualified-id before 'public'
DS3232RTC.h : 'string' does not name a type
DS3232RTC.h : 'string' does not name a type
DS3232RTC.cpp : DS3232RTC(I2CMaster&, uint8_t)' does not match any in class 'DS3232RTC'
DS3232RTC.h : DS3232RTC(const DS3232RTC&)
DS3232RTC.h : DS3232RTC()
DS3232RTC.cpp : : In member function 'void DS3232RTC::readTime(RTCTime*)':
DS3232RTC.cpp : readTime(RTCTime*)' without object
DS3232RTC.cpp : : In member function 'void DS3232RTC::readDate(RTCDate*)':
DS3232RTC.cpp : readDate(RTCDate*)' without object
DS3232RTC.cpp : : In member function 'void DS3232RTC::writeTime(const RTCTime*)':
DS3232RTC.cpp : writeTime(const RTCTime*)' without object
DS3232RTC.cpp : : In member function 'void DS3232RTC::writeDate(const RTCDate*)':
DS3232RTC.cpp : writeDate(const RTCDate*)' without object
DS3232RTC.cpp : : In member function 'void DS3232RTC::readAlarm(uint8_t, RTCAlarm*)':
DS3232RTC.cpp : readAlarm(uint8_t, RTCAlarm*)' without object
DS3232RTC.cpp : : In member function 'void DS3232RTC::writeAlarm(uint8_t, const RTCAlarm*)':
DS3232RTC.cpp : writeAlarm(uint8_t, const RTCAlarm*)' without object
DS3232RTC.cpp : : In member function 'uint8_t DS3232RTC::readByte(uint8_t)':
DS3232RTC.cpp : readByte(uint8_t)' without object
DS3232RTC.cpp : : In member function 'void DS3232RTC::writeByte(uint8_t, uint8_t)':
DS3232RTC.cpp : writeByte(uint8_t, uint8_t)' without object
DS3232RTC.cpp : : In member function 'int DS3232RTC::readTemperature()':
DS3232RTC.cpp : 'NO_TEMPERATURE' was not declared in this scope
DS3232RTC.cpp : : In member function 'void DS3232RTC::initAlarms()':
DS3232RTC.cpp : 'ALARM_COUNT' was not declared in this scope
Error compiling
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error compiling when using VS 2012
Reply #1 - Mar 1st, 2013 at 12:10am
Print Post  
Rick, 

I received the email with the file thanks. It isn't what I thought it might.

Which version of the arduino.exe is the plugin pointing to?
Do you see intellisense for the DS3232RTC library?

Thanks
« Last Edit: Mar 1st, 2013 at 12:11am by Tim@Visual Micro »  
Back to top
IP Logged
 
Rick Burns
Newbies
*
Offline


Posts: 7
Joined: Feb 26th, 2013
Re: Error compiling when using VS 2012
Reply #2 - Mar 1st, 2013 at 6:50am
Print Post  
Hi Tim,
              I am using Arduino v1.0.3 and yes, intellisense does work for the RTC.

I have sent you the RTC library which includes an example to try the RTC out which also produces the errors, if you could take a look, I would be grateful.

Thanks,

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error compiling when using VS 2012
Reply #3 - Mar 1st, 2013 at 9:35pm
Print Post  
Where can I get the softi2c library?

Thanks
  
Back to top
IP Logged
 
Rick Burns
Newbies
*
Offline


Posts: 7
Joined: Feb 26th, 2013
Re: Error compiling when using VS 2012
Reply #4 - Mar 2nd, 2013 at 1:56am
Print Post  
It's on its way.

Thanks again,

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error compiling when using VS 2012
Reply #5 - Mar 2nd, 2013 at 5:07pm
Print Post  
Hi Rick,

The softi2c lib won't compile unless you use arduino 0023 because it has arduino references for the older software version.

Did you send me the wrong lib or is this the one you are using?

Thanks

  
Back to top
IP Logged
 
Rick Burns
Newbies
*
Offline


Posts: 7
Joined: Feb 26th, 2013
Re: Error compiling when using VS 2012
Reply #6 - Mar 2nd, 2013 at 10:18pm
Print Post  
Hi Tim,
          I had 2 versions of the library under two different names.  I have sent you the correct one.

Thanks,

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error compiling when using VS 2012
Reply #7 - Mar 2nd, 2013 at 11:26pm
Print Post  
Hi Rick,

With the correct library your example compiles correctly for me.

Code
Select All
Compiling 'Rick_LCD_1' for 'Arduino Duemilanove w/ ATmega328'
Binary sketch size: 13794 bytes (of a 30720 byte maximum) (5.0235023 secs) 



I think the problem will be that you have/had duplicate library files and vm probably reads them in a different order to the arduino ide. It's luck that they work in arduino and might fail in the future if you allow duplicates. It's not supported with arduino.

Can you please ensure you have removed duplicates and ensure vm is pointing to a version of arduino such as 1.0.3.

I will move this thread to general because it is not related to the debugger. The fact that you VS is set to "Local Debugging" is confusing but i's just what VS calls it current "mode". If you watch our youtube video on the debugger page of visualmicro.com you will see how to enable debug.

Let me know how you get on after checking your install paths and cleaning up your library list. Don't forget libraries can be stored in two places arduinoide/libraries and sketchfolder/libraries

Look forward to hearing how you get on
  
Back to top
IP Logged
 
Rick Burns
Newbies
*
Offline


Posts: 7
Joined: Feb 26th, 2013
Re: Error compiling when using VS 2012
Reply #8 - Mar 15th, 2013 at 6:45am
Print Post  
Hi Tim,
              Success, at least with compiling, now if only I could get the debugging to work.  I guess that will be a new thread.

Cheers,

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