I installed the Arduino 2.0 RC6 to my F: drive, which has a user directory, however Arduino has decided it wants to put files on the C drive User directory, whilst it puts the IDE on the F: drive.
I am pretty sure that some of the problems I get are because of this anomaly, with compile errors of the sort, multiple definition of `analogReference', which refers to files on the C drive
Can I just move the Arduino15 to the F drive and if so, where are the config files for compile paths.
I don't like to use files on the C drive that can be placed elsewhere, given this has limited space, which I use for default Microsoft files and programs.
Most programs will use the User folder I have specified when placing the main program on that drive.
Hi @latedev. Thanks for taking the time to give the Arduino IDE 2.0.0 release candidate a try!
The Arduino IDE stores files in several locations outside of the installation folder. As you found, these default to the C: drive.
The easiest one to configure is the "Sketchbook" folder location. In addition to being a convenient place to save your sketches (because they will be listed under the File > Sketchbook menu and in the "Sketchbook" view), this is the place where libraries are installed by the Arduino "Library Manager", the IDE's Sketch > Include Library > Add .ZIP Library... features, and also some fundamental libraries that are installed on the first run of the IDE.
You can adjust the location of the sketchbook folder by following these instructions:
Select File > Preferences... from the Arduino IDE menus.
Set your desired sketchbook location via the Sketchbook location field.
Click the OK button.
Select File > Quit from the Arduino IDE menus.
Move anything of value from the old sketchbook location to new sketchbook location.
The other one of high interest is the "data" and "downloads" folders. These are used by the Arduino IDE to stage and install boards platforms and toolchains when you use the Arduino "Boards Manager", as well as when the "Arduino AVR Boards" platform is automatically installed on the first run of the IDE.
The location of this folder is configured in a YAML file. Modifying this configuration is a more advanced operation that is not recommended, but it is possible to do by following these instructions:
Select File > Quit from the Arduino IDE menus if it is running.
In this file, you will find the directories.data and directories.download configuration keys, which you can change to your preferred locations.
For example:
Move the contents of the previous locations to the new locations (or you can just use Boards Manager in the IDE to re-install any boards platforms if you prefer.
Sketch staging, build, and cache folders:
Various locations under %TEMP%
I am not aware of any way to configure the Arduino IDE to use different locations for these, but I think they are of less concern than the configurable ones, and their use by the IDE is well aligned with the behavior of most common applications.
I am not convinced. Please do this:
Compile any sketch that will produce that sort of error.
Right click on the black "Output" pane at the bottom of the Arduino IDE 2.x window.
From the context menu, click Copy All.
Open a forum reply here by clicking the Reply button.
Click the </> icon on the post composer toolbar.
This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
Press Ctrl+V.
This will paste the compilation output into the code block.
Move the cursor outside of the code tags before you add any additional text to your reply.
Thanks for the detailed reply, which I will implement today. The folder for the project had already been changed, given it was easily selectable from preferences.
Which is f:\Users\xxx\Documents\Arduino
As far as the anomaly is concerned, I am not really convinced, just grabbing at straws here.
It would appear to be something to do with a header file called twice by the looks of it. Normally I #ifdef my own files so that this could not happen.
No matter, here is the output generated by the compile.
wiring_analog.c.o (symbol from plugin): In function `analogReference':
(.text+0x0): multiple definition of `analogReference'
C:\Users\xxx\AppData\Local\Temp\arduino-sketch-CBAA7F9A572B7541332F3CF92E74E441\sketch\Sola.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here
wiring_analog.c.o (symbol from plugin): In function `analogReference':
(.text+0x0): multiple definition of `analog_reference'
C:\Users\xxx\AppData\Local\Temp\arduino-sketch-CBAA7F9A572B7541332F3CF92E74E441\sketch\Sola.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
Compilation error: exit status 1
This is after the #include <SimulatorProgram.h> is written into the file.