Loading...
Pages: [1]   Go Down
Author Topic: Eclipse does not compile dependancies  (Read 832 times)
0 Members and 1 Guest are viewing this topic.
Centurion RSA
Offline Offline
Full Member
***
Karma: 0
Posts: 154
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I use Eclipse with the AVR plugin and get the following linker error. It would seem that the included source is not compiled. Like the libraries for instance.

Code:
Invoking: AVR C++ Linker
avr-g++ -Wl,-Map,HLS.map,--cref -Wl,--gc-sections -L"C:\Users\Marius\Arduino\ArduinoCore\Release" -mmcu=atmega328p -o"HLS.elf"  ./AT25DF.o ./BMP085.o ./Battery.o ./Beeper.o ./Datastore.o ./Firmware.o ./Messages.o ./Radio.o ./SPI.o ./Settings.o   -lArduinoCore
./BMP085.o: In function `BMP085::setup()':
../BMP085.cpp:47: undefined reference to `Wire'

Any helpers?
Logged

Rather people think you to be a fool than you open your mouth and confirm it.

Guildford, UK
Offline Offline
Full Member
***
Karma: 0
Posts: 217
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The Arduino IDE does lots of things to make life easy for a beginner.

In the Arduino IDE you do not need to use function prototypes and libraries are picked up from the include statements.
When you switch to Eclipse this does not happen.

The libraries need to be built by you as separate projects.
The main program can then reference them in the project settings.

Iain
Logged

Centurion RSA
Offline Offline
Full Member
***
Karma: 0
Posts: 154
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Iain,
Do I compile each library separately or attempt to do them in one library object?
Logged

Rather people think you to be a fool than you open your mouth and confirm it.

Guildford, UK
Offline Offline
Full Member
***
Karma: 0
Posts: 217
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I created one project for each library.

Iain
Logged

Centurion RSA
Offline Offline
Full Member
***
Karma: 0
Posts: 154
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks, I will try that.
Logged

Rather people think you to be a fool than you open your mouth and confirm it.

Pages: [1]   Go Up
Print
 
Jump to: