Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » issues with linkage(New to eclipse, used to arduino "IDE")
issues with linkage [message #1785298] Thu, 12 April 2018 08:30
x eros is currently offline x erosFriend
Messages: 1
Registered: April 2018
Junior Member
Hello everybody!

I recently made the switch to Eclipse from Arduino IDE for my arduino-projects and it has not been a walk in the park..

I keep finding out how much difference there is between the Eclipse (sloeber plugin) C and the Arduino C languages, a byte isnt valid, gotta use unsigned char instead, serial.print doesnt work and so on (even with #include <Arduino.h>)

But i digress.. :)

My problem here today is that i keep running into linkage errors in the eclipse IDE, mostly not allowing me to call functions defined and declared in header and source files, that are #include´d in the main .ino file.

The compiler says " undefined reference to 'governorSetup()' " even tho it should work just fine in the arduino IDE.


My simplified project with this error is limited to 3 files, all in the same project folder:
mainProject.ino, governor.h, governor.c.

the mainProject.ino:
#include <Arduino.h>
#include "governor.h" 
void setup(){ governorSetup(); }
void loop() { //blank }


the governor.h:
#include <Arduino.h>
void governorSetup(void);


the governor.c:
#include "governor.h"
void governorSetup(void){
// do setup
}


 #ERROR: undefined reference to 'governorSetup()' (in mainProject.ino) 



Ive been battling these error messages for a few weeks now and i simply cannot find a way to avoid them, no matter how my code structure is implemented..

So could anyone please help me?
..im pretty lost on my own here..

Sincerely,
H
Previous Topic:View Report- operation not available
Next Topic:Need help installing web start plugin for eclipse
Goto Forum:
  


Current Time: Sun May 20 19:50:03 GMT 2018

Powered by FUDForum. Page generated in 0.03102 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top