Visual Micro
https://www.visualmicro.com/forums/YaBB.pl
Visual Micro >> Installation & Troubleshooting >> Building project code - always rebuilds
https://www.visualmicro.com/forums/YaBB.pl?num=1642437062

Message started by Johan Gummesson on Jan 17th, 2022 at 4:31pm

Title: Building project code - always rebuilds
Post by Johan Gummesson on 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\variants\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

https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=Test_005.zip (6 KB | 1 )
https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=Output_066.txt (158 KB | 3 )

Title: Re: Building project code - always rebuilds
Post by Tim@Visual Micro on 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.

Title: Re: Building project code - always rebuilds
Post by Johan Gummesson on 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

Visual Micro » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2022. All Rights Reserved.