-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Build folder not correctly cleaned when user sets static build.path
property
#4862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@steronydh , are you experiencing this with a nighlty build? Since arduino/arduino-builder@47f3fc4 was merged, I never got that error (since the .o generated by the previous sketch is ignored) |
Yes, it's a nightly. I'm getting this with two very similar sketches which access the same set of libraries. I think it could be the libraries which are causing this. |
Sorry but I need the sketches and the environment (core version, target boards etc), otherwise I'll never be able to replicate it coherently |
With nightly 1.6.9 2016/04/07 12:33, I can reproduce this in this way compiling for Mega2560. Specify a build folder in
Clean out the build folder. Open two new sketches. At the top of each add the global line: Compile one. No errors. Compile the second. I get errors about multiple definitions of |
This is the key, since usually two different sketches get compiled into different folders. I'll look into this but don't expect a fast solution (since the option is not reachable by the GUI) |
OK, no worries. Now there's the option to export the compiled binary to the sketch folder, I can probably delete this setting anyway. |
I can confirm that the problem goes away if I delete the line completely from preferences.txt, but not if I leave |
There is a problem with my original build now - gcc complains that the command line is too long! If I use my specified path it's fine, but the random path makes the linker call very long. (My project is quite big, producing a 100k+ hex file.) |
@facchinm, I think the changes I proposed in arduino/arduino-builder#86 would fix this (the duplicate symbol issue, not the linker commandline length). However, it would then still recompile everything whenever switching between Windows, but at least it would work. @steronydh, perhaps you could set a different build.path for each window / sketch by using the |
Fixed by arduino/arduino-builder#144 |
clean the temp folder where arduino saves temp files. Restart the IDE. Arduino will rebuild |
build.path
property
When using a specified Build folder, if you have two sketches open at once, the Build folder isn't cleaned out between compiles, which can lead to spurious "already defined" compiler errors. To solve this, it would be useful to have a menu item which cleans out the Build folder.
The text was updated successfully, but these errors were encountered: