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 compilation problems new version (Read 6376 times)
yeiyei
Newbies
*
Offline


Posts: 5
Joined: Sep 5th, 2016
compilation problems new version
Sep 5th, 2016 at 11:41am
Print Post  
Under new version of your wonderful plugin, i can't compile succesfully the project.

Data:
VS2015, device: NodemCU ESP12E
Arduino IDE 1.6.9.

The project is compiled well by arduino IDE, but no with VM. I think the problem is that code is distributed in different INOs. This problem has appeared when upgrading to latest version of VM. 
The versions pre-august were working well... And now i can't reinstall old versions, i don't know why.

Errors:
Code (C++)
Select All
RemoteSensor.ino: 38:15: error: variable or field 'drawLogo' declared void
   void drawLogo(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y)

RemoteSensor.ino: 38:15: error: 'OLEDDisplay' was not declared in this scope

RemoteSensor.ino: 38:28: error: 'display' was not declared in this scope
   void drawLogo(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y)

RemoteSensor.ino: 38:37: error: 'OLEDDisplayUiState' was not declared in this scope
   void drawLogo(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y)

RemoteSensor.ino: 38:57: error: 'state' was not declared in this scope
   void drawLogo(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y)

RemoteSensor.ino: 38:72: error: expected primary-expression before 'x
   void drawLogo(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y)

RemoteSensor.ino: 38:83: error: expected primary-expression before 'y
   void drawLogo(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y)

RemoteSensor.ino: 39:19: error: variable or field 'drawConnInfo' declared void
   void drawConnInfo(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y)

RemoteSensor.ino: 39:19: error: 'OLEDDisplay' was not declared in this scope

RemoteSensor.ino: 39:32: error: 'display' was not declared in this scope
   void drawConnInfo(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y)

RemoteSensor.ino: 39:41: error: 'OLEDDisplayUiState' was not declared in this scope
   void drawConnInfo(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y)

RemoteSensor.ino: 39:61: error: 'state' was not declared in this scope
   void drawConnInfo(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y)

RemoteSensor.ino: 39:76: error: expected primary-expression before 'x
   void drawConnInfo(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y)

RemoteSensor.ino: 39:87: error: expected primary-expression before 'y
   void drawConnInfo(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y)

RemoteSensor.ino: 40:20: error: variable or field 'drawAmbiental' declared void
   void drawAmbiental(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y)

RemoteSensor.ino: 40:20: error: 'OLEDDisplay' was not declared in this scope

RemoteSensor.ino: 40:33: error: 'display' was not declared in this scope
   void drawAmbiental(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y)

RemoteSensor.ino: 40:42: error: 'OLEDDisplayUiState' was not declared in this scope
   void drawAmbiental(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y)

RemoteSensor.ino: 40:62: error: 'state' was not declared in this scope
   void drawAmbiental(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y)

RemoteSensor.ino: 40:77: error: expected primary-expression before 'x
   void drawAmbiental(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y)

RemoteSensor.ino: 40:88: error: expected primary-expression before 'y
   void drawAmbiental(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y)

RemoteSensor.ino: 41:19: error: variable or field 'drawWatering' declared void
   void drawWatering(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y)

RemoteSensor.ino: 41:19: error: 'OLEDDisplay' was not declared in this scope

RemoteSensor.ino: 41:32: error: 'display' was not declared in this scope
   void drawWatering(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y)

RemoteSensor.ino: 41:41: error: 'OLEDDisplayUiState' was not declared in this scope
   void drawWatering(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y)

RemoteSensor.ino: 41:61: error: 'state' was not declared in this scope
   void drawWatering(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y)

RemoteSensor.ino: 41:76: error: expected primary-expression before 'x
   void drawWatering(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y)

RemoteSensor.ino: 41:87: error: expected primary-expression before 'y
   void drawWatering(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y)

RemoteSensor.ino: 42:20: error: variable or field 'headerOverlay' declared void
   void headerOverlay(OLEDDisplay *display, OLEDDisplayUiState* state)

RemoteSensor.ino: 42:20: error: 'OLEDDisplay' was not declared in this scope

RemoteSensor.ino: 42:33: error: 'display' was not declared in this scope
   void headerOverlay(OLEDDisplay *display, OLEDDisplayUiState* state)

RemoteSensor.ino: 42:42: error: 'OLEDDisplayUiState' was not declared in this scope
   void headerOverlay(OLEDDisplay *display, OLEDDisplayUiState* state)

RemoteSensor.ino: 42:62: error: 'state' was not declared in this scope
   void headerOverlay(OLEDDisplay *display, OLEDDisplayUiState* state)

RemoteSensor.ino: 64:1: error: 'IrrigationTask' does not name a type
   IrrigationTask *getNextTask()

Display.ino: 19:32: error: 'headerOverlay' was not declared in this scope
   OverlayCallback overlays[] = { headerOverlay }

Display.ino: 28:28: error: 'drawLogo' was not declared in this scope
   FrameCallback frames[] = { drawLogo, drawConnInfo, drawAmbiental, drawWatering }

Display.ino: 28:38: error: 'drawConnInfo' was not declared in this scope
   FrameCallback frames[] = { drawLogo, drawConnInfo, drawAmbiental, drawWatering }

Display.ino: 28:52: error: 'drawAmbiental' was not declared in this scope
   FrameCallback frames[] = { drawLogo, drawConnInfo, drawAmbiental, drawWatering }

Display.ino: 28:67: error: 'drawWatering' was not declared in this scope
   FrameCallback frames[] = { drawLogo, drawConnInfo, drawAmbiental, drawWatering }

RemoteSensor.ino: In function void drawMsg(const String&, const String&)

Display.ino: 100:41: error: 'headerOverlay' was not declared in this scope
   headerOverlay(&display, ui.getUiState())

RemoteSensor.ino: In function void drawWatering(OLEDDisplay*, OLEDDisplayUiState*, int16_t, int16_t)

Display.ino: 228:72: error: 'getNextTask' was not declared in this scope
   display->drawString(64 + x, 31 + y, "Next in " + String(getNextTask()->getTimeToStart(wifiManager.timeClient->getDateTime())))
Error compiling project sources 



Any help?

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


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: compilation problems new version
Reply #1 - Sep 5th, 2016 at 11:48am
Print Post  
Hi,

Please switch on vmicro>compiler>verbose and also "show build properties". Then build and post the output as a .txt file or email to info[at]visualmicro.com

Thanks

Temporary: You can also switch on file>preferences>external editor in the arduino ide which allow you to edit in vs but build easily in arduino
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: compilation problems new version
Reply #2 - Sep 5th, 2016 at 12:22pm
Print Post  
Thanks for the email I will look at it.

Can you confirm if clicking Build>Clean Solution solves the issue? The clean function simply clears the temp build folder.

If you could also email your sketch that would save me some time in setting up an example to reproduce.

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


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: compilation problems new version
Reply #3 - Sep 5th, 2016 at 8:03pm
Print Post  
To install an old version if you uninstall in "tools>extensions and updates" then install the previous release but it would be useful to save the build folder before updating.

The build folder is here

C:\Users\[YOUR NAME]\AppData\Local\Temp\VMicroBuilds\RemoteSensor\esp8266com_nodemcuv2

Can you also please open the arduino ide. switch on file>preferences>verbose then open your project and build. Then email the output to me.

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


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: compilation problems new version
Reply #4 - Sep 5th, 2016 at 8:07pm
Print Post  
In addition to the previous post please zip and email the ESP8266_Oled_Driver_for_SSD1306_display library because all issues seem to be with the lib

Maybe it has slightly strange format. There are two structures for an arduino library one with \src and one without. Which is yours? and which files are in the library root?

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


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: compilation problems new version
Reply #5 - Sep 7th, 2016 at 8:22pm
Print Post  
Hi,

Thanks for all the info.

One thing I would like to clarify...

In your email you said this

Quote:
The only error marked are the main functions in the ino files that are not present in RemoteSensor.ino, that is the main ino for the project.


That is useful thanks.

Can you first ensure that the Visual Micro Project Property "Micro General (Project Global)>Generate Prototypes=True?

1)
If it is False then that is the problem.

2)
Make sure the project folder does not contain a RemoteSensor.cpp otherwise that will be used instead of .ino files

3)
Otherwise please see that your output shows the temp build folder (ppData\Local\Temp\VMicroBuilds\RemoteSensor\esp8266com_nodemcuv2)

In the temp build folder will be the RemoteSensor.cpp that Visual Micro creates with the combination of .ino files + prototypes and arduino.h header. Please look in the file to see where the ptototypes are located?



Thanks


  
Back to top
IP Logged
 
yeiyei
Newbies
*
Offline


Posts: 5
Joined: Sep 5th, 2016
Re: compilation problems new version
Reply #6 - Sep 10th, 2016 at 11:37am
Print Post  
First of all, thank you very much for your time and support.

I have found what is happening. Is it my fault? i will explain...

- If there is some define before the includes of the ino files, it won't import correctly the libraries.
- In addition, if you put a first variable in the main ino file inside a ifdef directive, the prototypes of the functions will be generated inside that ifdef int the cpp file (temp folder). If that ifdef is not active the definitions won't work.

Taking into account the exposed issues, all goes normally.

Thank you for your patience and support again, and sorry for the incovenience.
« Last Edit: Sep 10th, 2016 at 11:38am by yeiyei »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: compilation problems new version
Reply #7 - Sep 10th, 2016 at 2:01pm
Print Post  
No problem thanks very much for the update.

Actually the complexity you mention that affects the insertion point of prototypes was resolved by a new function in the arduino ide 1.6.8+ but matured for 1.6.10.

Visual Micro does not yet implement the same functionality but will do very shortly.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint