Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Error 1 when compiling

2014-04-20
2014-04-20
  • countChocolate
    countChocolate
    2014-04-20

    Hey,

    I've been trying to get this plugin stalled on Eclipse for the past few hours and haven't had much luck. I have been following these two tutorials:

    http://horrorcoding.altervista.org/arduino-development-with-eclipse-a-step-by-step-tutorial-to-the-basic-setup/
    http://www.chipkin.com/using-eclipse-with-arduino-duemilanove/?replytocom=1942#respond

    Neither of them worked so far. Right now, when I try to compile the blink code for an arduino Nano, I get this:

    avr-g++ --cref -s -Os -o"Blinky.elf" ./mainBlink.o -lm -Wl,-Map,Blinky.map,--cref -mrelax -Wl,--gc-sections -L"C:\EclipseArduino\WorkSpace\ArduinoCoreNano" -mmcu=atmega328p
    ./mainBlink.o: In function loop': mainBlink.cpp:(.text.loop+0x6): undefined reference todigitalWrite'
    mainBlink.cpp:(.text.loop+0x12): undefined reference to delay' mainBlink.cpp:(.text.loop+0x1c): undefined reference todigitalWrite'
    mainBlink.cpp:(.text.loop+0x28): undefined reference to delay' ./mainBlink.o: In functionsetup':
    mainBlink.cpp:(.text.setup+0x6): undefined reference to pinMode' ./mainBlink.o: In functionmain':
    mainBlink.cpp:(.text.main+0x0): undefined reference to `init'
    make: *** [Blinky.elf] Error 1

    Any help would be greatly appreciated!

    Thanks

     
  • countChocolate
    countChocolate
    2014-04-20

    I found the error, I didn't add the library correctly in step 12 of the second link I posted.