Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
Support requests without the output above may be impossible to answer, so please help us to help you
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Pages: 1 2 
Send Topic Print
Don't understand these compiler errors (Read 13269 times)
Jan Friberg
Junior Member
**
Offline



Posts: 72
Don't understand these compiler errors
Sep 10th, 2016 at 10:40pm
 
Using Visual Studio I get this error messages

Compiling debug version of 'WeatherDisplay' for 'Arduino/Genuino Mega w/ ATmega2560 (Mega 2560)'

Compiling 'WeatherDisplay' for 'Arduino/Genuino Mega w/ ATmega2560 (Mega 2560)'

WeatherDisplay.ino: 11:18: fatal error: user.h: No such file or directory
   #include "user.h"
   compilation terminated

Makes no sense to me because the file user.h is checked to indeed be in the same folder as the sketch
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10388
United Kingdom
Re: Don't understand these compiler errors
Reply #1 - Sep 10th, 2016 at 11:02pm
 
If the .h actually included in the Visual Studio project?
Back to top
 
WWW  
IP Logged
 
Jan Friberg
Junior Member
**
Offline



Posts: 72
Re: Don't understand these compiler errors
Reply #2 - Sep 11th, 2016 at 12:39am
 
Visual Micro wrote on Sep 10th, 2016 at 11:02pm:
If the .h actually included in the Visual Studio project?


Yes here is part of my code where it seen included in the last line

Code (C++):
//Weather station V1.4
#include <TimeLib.h>
#include <Time.h>
#include <EEPROM.h>
#include <string.h>
#include <memorysaver.h>
#include <Wire.h>
#include <SdVolume.h>
#include <SdStream.h>
#include <SdInfo.h>
#include <SdFile.h>
#include <SdFatUtil.h>
#include <SdFatStructs.h>
#include <SdFatmainpage.h>
#include <SdFatConfig.h>
#include <SdFat.h>
#include <SdBaseFile.h>
#include <Sd2Card.h>
#include <ostream.h>
#include <MinimumSerial.h>
#include <istream.h>
#include <iostream.h>
#include <ios.h>
#include <bufstream.h>
#include <ArduinoStream.h>
#include <OneWire.h>
#include <UTFT.h>
#include <UTouch.h>
#include <DS1307RTC.h>
#include "user.h"

 


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



Posts: 10388
United Kingdom
Re: Don't understand these compiler errors
Reply #3 - Sep 11th, 2016 at 1:22pm
 
I meant is the .h actually included in the visual studio project (right click solution explorer include/exclude)

To save us some time it might be easier if you zip and email your project folder so I can look at your setup.

Thanks

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



Posts: 72
Re: Don't understand these compiler errors
Reply #4 - Sep 11th, 2016 at 3:24pm
 
Visual Micro wrote on Sep 11th, 2016 at 1:22pm:
I meant is the .h actually included in the visual studio project (right click solution explorer include/exclude)

To save us some time it might be easier if you zip and email your project folder so I can look at your setup.

Thanks



Not sure what you mean. Right clicking solution explorer does not show any include/exclude item. Do you mean the .h file should be listed under headers in the solution explorer. Tried adding it there and it didn't work. Other compiler errors.
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10388
United Kingdom
Re: Don't understand these compiler errors
Reply #5 - Sep 11th, 2016 at 5:08pm
 
Hi,

The Visual Studio Solution Explorer has two modes. One where it shows all files on disk and the physical structure of the folders. The other shows a filtered view of virtual folders such as "Source", "Headers" etc.

Click the "project" in the solution explorer then you should see a small icon above the explorer called "Show all files". The button is a checkbox button that can be on or off.

A screen shot of the solution explorer with you right clicking the file would be useful.

email address is info[at]visualmicro.com
Back to top
« Last Edit: Sep 11th, 2016 at 5:09pm by Visual Micro »  
WWW  
IP Logged
 
Jan Friberg
Junior Member
**
Offline



Posts: 72
Re: Don't understand these compiler errors
Reply #6 - Sep 11th, 2016 at 6:42pm
 
Visual Micro wrote on Sep 11th, 2016 at 5:08pm:
Hi,

The Visual Studio Solution Explorer has two modes. One where it shows all files on disk and the physical structure of the folders. The other shows a filtered view of virtual folders such as "Source", "Headers" etc.

Click the "project" in the solution explorer then you should see a small icon above the explorer called "Show all files". The button is a checkbox button that can be on or off.

A screen shot of the solution explorer with you right clicking the file would be useful.

email address is info[at]visualmicro.com


Screenshot mailed
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10388
United Kingdom
Re: Don't understand these compiler errors
Reply #7 - Sep 11th, 2016 at 10:17pm
 
thanks. please zip and email the project so I can try it.
Back to top
 
WWW  
IP Logged
 
Jan Friberg
Junior Member
**
Offline



Posts: 72
Re: Don't understand these compiler errors
Reply #8 - Sep 11th, 2016 at 10:22pm
 
Visual Micro wrote on Sep 11th, 2016 at 10:17pm:
thanks. please zip and email the project so I can try it.


Have done so now.
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10388
United Kingdom
Re: Don't understand these compiler errors
Reply #9 - Sep 11th, 2016 at 11:08pm
 
Thanks. It did not have #include  "user.h" in the code but I added it and got compile errors related to the user.h so it was found okay.

I assume you are on the most recent version of visual micro 1609.9?

Please switch on the "verbose" and "show build properties" then build and email the output as .txt

Thanks
Back to top
« Last Edit: Sep 11th, 2016 at 11:09pm by Visual Micro »  
WWW  
IP Logged
 
Jan Friberg
Junior Member
**
Offline



Posts: 72
Re: Don't understand these compiler errors
Reply #10 - Sep 12th, 2016 at 8:09pm
 
Visual Micro wrote on Sep 11th, 2016 at 11:08pm:
Thanks. It did not have #include  "user.h" in the code but I added it and got compile errors related to the user.h so it was found okay.

I assume you are on the most recent version of visual micro 1609.9?

Please switch on the "verbose" and "show build properties" then build and email the output as .txt

Thanks


I first tried removing include user.h and forgot to put it back
I also assume I use the latest visual micro since I don't get any notification about available update and have recently made an upgrade. But I don't see how I can see which version I have.
I have mailed the output as requested
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10388
United Kingdom
Re: Don't understand these compiler errors
Reply #11 - Sep 12th, 2016 at 8:19pm
 
Okay well you reported the user.h wasn't being found. Maybe that was a cashing issues that was resolved after update or vm or restart of ide.

The compile errors in the output you sent show the user.h is being discovered correctly.

Code:
WeatherDisplay.ino: 32:14: error: redefinition of 'tmElements_t tm
   tmElements_t tm

WeatherDisplay.ino:10: In file included from
user.h:10: note  tmElements_t tm previously declared here
   tmElements_t tm;        \\Declare tmElements object to store time & date from DS3231

WeatherDisplay.ino: 34:7: error: redefinition of 'float T_outmax
   float T_outmax, T_outmin, T_inmax, T_inmin

WeatherDisplay.ino:10: In file included from
user.h:12: note  float T_outmax previously declared here
   float T_outmax,T_outmin,T_inmax,T_inmin

WeatherDisplay.ino: 34:17: error: redefinition of 'float T_outmin
   float T_outmax, T_outmin, T_inmax, T_inmin

WeatherDisplay.ino:10: In file included from
user.h:12: note  float T_outmin previously declared here
   float T_outmax,T_outmin,T_inmax,T_inmin

WeatherDisplay.ino: 34:27: error: redefinition of 'float T_inmax
   float T_outmax, T_outmin, T_inmax, T_inmin

WeatherDisplay.ino:10: In file included from
user.h:12: note  float T_inmax previously declared here
   float T_outmax,T_outmin,T_inmax,T_inmin

WeatherDisplay.ino: 34:36: error: redefinition of 'float T_inmin
   float T_outmax, T_outmin, T_inmax, T_inmin

WeatherDisplay.ino:10: In file included from
user.h:12: note  float T_inmin previously declared here
   float T_outmax,T_outmin,T_inmax,T_inmin

WeatherDisplay.ino: In function boolean Write2RTCAlarmMemory()

WeatherDisplay.ino: 465:24: error: 'DS1307_CTRL_ID' was not declared in this scope
   Wire.beginTransmission(DS1307_CTRL_ID)

WeatherDisplay.ino: In function boolean ReadRTCAlarmMemory()

WeatherDisplay.ino: 482:24: error: 'DS1307_CTRL_ID' was not declared in this scope
   Wire.beginTransmission(DS1307_CTRL_ID)
Error compiling project sources
 

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



Posts: 72
Re: Don't understand these compiler errors
Reply #12 - Sep 12th, 2016 at 9:45pm
 
Now I don't understand why I get these compiler errors

Compiling debug version of 'WeatherDisplay' for 'Arduino/Genuino Mega w/ ATmega2560 (Mega 2560)'

ccu2B6Ag.ltrans1.ltrans.o*: In function DisplayHeaders()
ccu2B6Ag.ltrans1.o*: (.text+0x540): undefined reference to SevenSegmentFull
ccu2B6Ag.ltrans1.o*: (.text+0x542): undefined reference to SevenSegmentFull

ccu2B6Ag.ltrans1.ltrans.o*: In function loop
ccu2B6Ag.ltrans1.o*: (.text+0xc3c): undefined reference to SevenSegmentFull
ccu2B6Ag.ltrans1.o*: (.text+0xc3e): undefined reference to SevenSegmentFull
ccu2B6Ag.ltrans1.o*: (.text+0xfd6): undefined reference to SevenSegmentFull
ccu2B6Ag.ltrans1.ltrans.o*: ccu2B6Ag.ltrans1.o:(.text+0xfd8): more undefined references to SevenSegmentFull follow

collect2.exe*: error: ld returned 1 exit status

Error compiling for board Arduino/Genuino Mega w/ ATmega2560 (Mega 2560)
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10388
United Kingdom
Re: Don't understand these compiler errors
Reply #13 - Sep 12th, 2016 at 10:45pm
 
Do you get a problem in arduino ide?
Back to top
 
WWW  
IP Logged
 
Jan Friberg
Junior Member
**
Offline



Posts: 72
Re: Don't understand these compiler errors
Reply #14 - Sep 13th, 2016 at 5:16pm
 
Visual Micro wrote on Sep 12th, 2016 at 10:45pm:
Do you get a problem in arduino ide?


Yes but not the same error messages but instead this

Arduino: 1.6.11 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

C:\Users\Jan Work\Documents\Arduino\WeatherDisplay\WeatherDisplay.ino: In function 'void DisplayTime()':

C:\Users\Jan Work\Documents\Arduino\WeatherDisplay\WeatherDisplay.ino:146:25: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

   myGLCD.print(":",64,19);

                         ^

C:\Users\Jan Work\Documents\Arduino\WeatherDisplay\WeatherDisplay.ino: In function 'void DisplayTemp(char*, char)':

C:\Users\Jan Work\Documents\Arduino\WeatherDisplay\WeatherDisplay.ino:194:39: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    {blank=32;myGLCD.print(" ",LEFT,184);}

                                       ^

C:\Users\Jan Work\Documents\Arduino\WeatherDisplay\WeatherDisplay.ino:199:34: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    myGLCD.print(" ",LEFT+4*32,184);

                                  ^

C:\Users\Jan Work\Documents\Arduino\WeatherDisplay\WeatherDisplay.ino:206:32: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    myGLCD.print("  Max",146,169);

                                ^

C:\Users\Jan Work\Documents\Arduino\WeatherDisplay\WeatherDisplay.ino:207:30: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    myGLCD.print("   ",162,184);

                              ^

C:\Users\Jan Work\Documents\Arduino\WeatherDisplay\WeatherDisplay.ino:212:34: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    myGLCD.print("Max    ",144,169);

                                  ^

C:\Users\Jan Work\Documents\Arduino\WeatherDisplay\WeatherDisplay.ino:213:55: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    myGLCD.print("    ",172+(8*(strlen(tempstr))-1),184);

                                                       ^

C:\Users\Jan Work\Documents\Arduino\WeatherDisplay\WeatherDisplay.ino:215:31: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    myGLCD.print("    ",204,184);

                               ^

C:\Users\Jan Work\Documents\Arduino\WeatherDisplay\WeatherDisplay.ino:222:35: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    myGLCD.print(" Min    ",162,201);

                                   ^

C:\Users\Jan Work\Documents\Arduino\WeatherDisplay\WeatherDisplay.ino:223:28: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    myGLCD.print(" ",162,216);

                            ^

C:\Users\Jan Work\Documents\Arduino\WeatherDisplay\WeatherDisplay.ino:228:33: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    myGLCD.print("Min   ",144,201);

                                 ^

C:\Users\Jan Work\Documents\Arduino\WeatherDisplay\WeatherDisplay.ino:229:55: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    myGLCD.print("    ",172+(8*(strlen(tempstr))-1),216);

                                                       ^

C:\Users\Jan Work\Documents\Arduino\WeatherDisplay\WeatherDisplay.ino:248:41: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

   myGLCD.print("Error header",CENTER,222);

                                         ^

C:\Users\Jan Work\Documents\Arduino\WeatherDisplay\WeatherDisplay.ino: In function 'void DisplayHeaders()':

C:\Users\Jan Work\Documents\Arduino\WeatherDisplay\WeatherDisplay.ino:256:31: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

  myGLCD.print("Klockan",LEFT,1);

                               ^

C:\Users\Jan Work\Documents\Arduino\WeatherDisplay\WeatherDisplay.ino:257:40: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

  myGLCD.print("Termometrar (C)",LEFT,71);

                                        ^

C:\Users\Jan Work\Documents\Arduino\WeatherDisplay\WeatherDisplay.ino:258:33: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

  myGLCD.print("Utomhus",LEFT,169);

                                 ^

C:\Users\Jan Work\Documents\Arduino\WeatherDisplay\WeatherDisplay.ino:259:35: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

  myGLCD.print("Hygrometer",RIGHT,1);

                                   ^

C:\Users\Jan Work\Documents\Arduino\WeatherDisplay\WeatherDisplay.ino:260:27: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

  myGLCD.print("%",RIGHT,51);

                           ^

C:\Users\Jan Work\Documents\Arduino\WeatherDisplay\WeatherDisplay.ino:261:32: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

  myGLCD.print("Inomhus",LEFT,93);

                                ^

C:\Users\Jan Work\Documents\Arduino\WeatherDisplay\WeatherDisplay.ino:262:27: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

  myGLCD.print("Max",144,95);

                           ^

C:\Users\Jan Work\Documents\Arduino\WeatherDisplay\WeatherDisplay.ino:263:28: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

  myGLCD.print("Min",144,127);

                            ^

C:\Users\Jan Work\Documents\Arduino\WeatherDisplay\WeatherDisplay.ino:264:31: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

  myGLCD.print("Baromet",206,95);

                               ^

C:\Users\Jan Work\Documents\Arduino\WeatherDisplay\WeatherDisplay.ino:265:31: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

  myGLCD.print("(mmHg)",214,111);

                               ^

C:\Users\JANWOR~1\AppData\Local\Temp\ccXy8rOY.ltrans1.ltrans.o: In function `DisplayHeaders()':

ccXy8rOY.ltrans1.o:(.text+0x540): undefined reference to `SevenSegmentFull'

ccXy8rOY.ltrans1.o:(.text+0x542): undefined reference to `SevenSegmentFull'

C:\Users\JANWOR~1\AppData\Local\Temp\ccXy8rOY.ltrans1.ltrans.o: In function `loop':

ccXy8rOY.ltrans1.o:(.text+0xc3c): undefined reference to `SevenSegmentFull'

ccXy8rOY.ltrans1.o:(.text+0xc3e): undefined reference to `SevenSegmentFull'

ccXy8rOY.ltrans1.o:(.text+0xfd6): undefined reference to `SevenSegmentFull'

C:\Users\JANWOR~1\AppData\Local\Temp\ccXy8rOY.ltrans1.ltrans.o:ccXy8rOY.ltrans1.
o:(.text+0xfd8): more undefined references to `SevenSegmentFull' follow

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board Arduino/Genuino Mega or Mega 2560.
Library is already installed: Time version 1.5.0

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

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



Posts: 10388
United Kingdom
Re: Don't understand these compiler errors
Reply #15 - Sep 13th, 2016 at 6:53pm
 
Same error

If you switch on the visual micro warnings you will also see the warnings you see in the arduino ide.

However the error is the same just spaced out more in arduino

Here is the error shown in the arduino ide report you have posted

Code:
C:\Users\JANWOR~1\AppData\Local\Temp\ccXy8rOY.ltrans1.ltrans.o: In function `DisplayHeaders()':
ccXy8rOY.ltrans1.o:(.text+0x540): undefined reference to `SevenSegmentFull'
ccXy8rOY.ltrans1.o:(.text+0x542): undefined reference to `SevenSegmentFull'
C:\Users\JANWOR~1\AppData\Local\Temp\ccXy8rOY.ltrans1.ltrans.o: In function `loop':
ccXy8rOY.ltrans1.o:(.text+0xc3c): undefined reference to `SevenSegmentFull'
ccXy8rOY.ltrans1.o:(.text+0xc3e): undefined reference to `SevenSegmentFull'
ccXy8rOY.ltrans1.o:(.text+0xfd6): undefined reference to `SevenSegmentFull'
C:\Users\JANWOR~1\AppData\Local\Temp\ccXy8rOY.ltrans1.ltrans.o:ccXy8rOY.ltrans1.
o:(.text+0xfd8): more undefined references to `SevenSegmentFull' follow

collect2.exe: error: ld returned 1 exit status 




and this is what you posted earlier from visual micro

Code:
ccu2B6Ag.ltrans1.ltrans.o*: In function DisplayHeaders()
ccu2B6Ag.ltrans1.o*: (.text+0x540): undefined reference to SevenSegmentFull
ccu2B6Ag.ltrans1.o*: (.text+0x542): undefined reference to SevenSegmentFull
ccu2B6Ag.ltrans1.ltrans.o*: In function loop
ccu2B6Ag.ltrans1.o*: (.text+0xc3c): undefined reference to SevenSegmentFull
ccu2B6Ag.ltrans1.o*: (.text+0xc3e): undefined reference to SevenSegmentFull
ccu2B6Ag.ltrans1.o*: (.text+0xfd6): undefined reference to SevenSegmentFull
ccu2B6Ag.ltrans1.ltrans.o*: ccu2B6Ag.ltrans1.o:(.text+0xfd8): more undefined references to SevenSegmentFull follow

collect2.exe*: error: ld returned 1 exit status 



Looks like the error is

Code:
 undefined reference to SevenSegmentFul 



Back to top
« Last Edit: Sep 13th, 2016 at 6:54pm by Visual Micro »  
WWW  
IP Logged
 
Jan Friberg
Junior Member
**
Offline



Posts: 72
Re: Don't understand these compiler errors
Reply #16 - Sep 13th, 2016 at 7:23pm
 
Visual Micro wrote on Sep 13th, 2016 at 6:53pm:
Looks like the error is

Code:

undefined reference to SevenSegmentFul




And I certainly don't understand why this is an error. In my user.h I have
Code (C++):
extern			uint8_t SevenSegmentFull[];
 



So why should this be undefined ? Also this code has compiled and worked before
(in my error list I see SevenSegmentFull and not SevenSegmentFul as cited above)
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10388
United Kingdom
Re: Don't understand these compiler errors
Reply #17 - Sep 13th, 2016 at 7:37pm
 
Hi,

Sorry but I don't know your code or what has happened to it since it worked.

It's a standard arduino compiler error so should find solution or help in code forum.

Thanks
Back to top
 
WWW  
IP Logged
 
Jan Friberg
Junior Member
**
Offline



Posts: 72
Re: Don't understand these compiler errors
Reply #18 - Sep 14th, 2016 at 6:53pm
 
Visual Micro wrote on Sep 11th, 2016 at 1:22pm:
I meant is the .h actually included in the visual studio project (right click solution explorer include/exclude)

To save us some time it might be easier if you zip and email your project folder so I can look at your setup.

Thanks



Problem with user.h not found is back in another project. I see user.h listed in the solution explorer. I have zipped and mailed it.
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10388
United Kingdom
Re: Don't understand these compiler errors
Reply #19 - Sep 14th, 2016 at 7:17pm
 
Hi,

There wasn't an attachment with the email you sent.

Can you confirm the issue exists if you restart the ide?

Also please confirm the visual micro version from tools>extensions and updates

Thanks
Back to top
 
WWW  
IP Logged
 
Pages: 1 2 
Send Topic Print