I've just downloaded the AVR plugin for Eclipse and am having a problem with
the command that is being composed at the linker stage. FWIW - I'm using
Helios, Ubuntu 11, and avr-gcc 4.3.5. avr-gcc linker seems to be upset with
the command syntax for specifying libraries and doesn't appear to want the -l
specified (that's dash lowercase ell). I'm trying to add a reference to the
core.a file that I snagged from an arduino sketch and copied into my eclipse
project as libArduinoCoreUno.a. Here is the linker command that the AVR plugin
is trying to run and the results:
If I replace the -l with the full path to the library file, I'm able to run
the command successfully on the command line which makes me wonder if the -l
option has been removed from avr-gcc
in the build settings for the "AVR C++ Linker" you need to add your
libArduinoCoreUno.a without the 'lib' at the beginning and without the '.a' at
the end, just 'ArduinoCoreUno'.
Both the 'lib' prefix and the '.a' suffix are automatically added by the
linker.
I just tested it and it works without problems (see screenshot below)
Cheers,
Thomas
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've just downloaded the AVR plugin for Eclipse and am having a problem with
the command that is being composed at the linker stage. FWIW - I'm using
Helios, Ubuntu 11, and avr-gcc 4.3.5. avr-gcc linker seems to be upset with
the command syntax for specifying libraries and doesn't appear to want the -l
specified (that's dash lowercase ell). I'm trying to add a reference to the
core.a file that I snagged from an arduino sketch and copied into my eclipse
project as libArduinoCoreUno.a. Here is the linker command that the AVR plugin
is trying to run and the results:
/usr/lib/gcc/avr/4.3.5/../../../avr/bin/ld: cannot find -llibArduinoCoreUno.a
If I replace the -l with the full path to the library file, I'm able to run
the command successfully on the command line which makes me wonder if the -l
option has been removed from avr-gcc
This command works:
Hi,
in the build settings for the "AVR C++ Linker" you need to add your
libArduinoCoreUno.a without the 'lib' at the beginning and without the '.a' at
the end, just 'ArduinoCoreUno'.
Both the 'lib' prefix and the '.a' suffix are automatically added by the
linker.
I just tested it and it works without problems (see screenshot below)
Cheers,
Thomas
Yes indeed, that got rid of the error, thanks!