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....
  • 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
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
Building project code - always rebuilds (Read 311 times)
Johan Gummesson
Junior Member
**
Offline



Posts: 24
Building project code - always rebuilds
Jan 17th, 2022 at 4:31pm
 
Hi,
I have an issue with the compile time increasing with every new class/file added to the project. That is due to the fact that the project files are always rebuilt. It’s working fine when only a single .ino file is part of the project but as soon as you add more files to the project, the problems starts

For example if you have a small sketch, including the file Foo.h, both the sketch and Foo.cpp are always rebuilt

Code (C++):
#include "Foo.h"

Foo _foo = Foo();

void setup() {
}

void loop() {
} 


Quote:
Building project code ...
"..."-IC:\Users\Johan\AppData\Local\Temp\VMBuilds\Test\esp32_esp32\Release\Test.
cpp" -o "C:\Users\Johan\AppData\Local\Temp\VMBuilds\Test\esp32_esp32\Release\Test.cpp.o"

"..." -I"C:\Users\Johan\AppData\Local\arduino15\packages\esp32\hardware\esp32\2.0.2\va
riants\esp32" "C:\Users\Johan\AppData\Local\Temp\VMBuilds\Test\esp32_esp32\Release\Foo.cpp" -o "C:\Users\Johan\AppData\Local\Temp\VMBuilds\Test\esp32_esp32\Release\Foo.cpp.o"


If Foo is deleted, both from the project and from the sketch, everything works fine.

Code (C++):
void setup() {
}

void loop() {
} 


Quote:
Building project code ...
Using previously compiled file: C:\Users\Johan\AppData\Local\Temp\VMBuilds\Test\esp32_esp32\Release\Test.cpp.o


All this works fine when building from the Arduino IDE.
Is this a bug or have I missed some settings somewhere?

Attaching code files and build log

Regards
Johan
Back to top
 

Please Register or Login to the Forum to see File Attachments
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline



Posts: 11355
United Kingdom
Re: Building project code - always rebuilds
Reply #1 - Jan 18th, 2022 at 1:44pm
 
Thank you for this report. We are looking into this and will publish a fix during the next 24 hours.
Back to top
 

Tim Leek
home
WWW  
IP Logged
 
Johan Gummesson
Junior Member
**
Offline



Posts: 24
Re: Building project code - always rebuilds
Reply #2 - Jan 20th, 2022 at 10:24am
 
I can confirm that this is now working with the new release, 21.11.08.1915 and 21.11.08.2215

Quote:
Building project code ...
  Using previously compiled file: C:\Users\Johan\AppData\Local\Temp\VMBuilds\Test\esp32_esp32\Release\Test.cpp.o
  Using previously compiled file: C:\Users\Johan\AppData\Local\Temp\VMBuilds\Test\esp32_esp32\Release\Foo.cpp.o


Regards
Johan
Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print