Undefined Reference to 'pinMode'


I'm attempting to configure Qt Creator to work with the Arduino library and have run into an issue with undefined references. I've compiled the core library statically as 'libArduinoCore.a' (on Windows here), however when inspecting the AR file I can see the 'wiring_digital.o' object is omitted. Given that this object contains the implementations for 'pinMode' I believe the core library to be the culprit.

Has anyone run into similar issues when using other IDEs (eg. Eclipse)? Thanks for any information.

Kind regards, Mark Davies

Ps: I should mention that I'm working with the RedBoard, an UNO clone (atmega328p).

...just a quick note: the following snapshot shows the contents of the static library:

(link removed by moderator)

There are no 'wiring_*' objects included. This was taken from the 'core.a' file compiled from the IDE, using the Blink example sketch. Thanks for any insight.


Find another place to host the image. I suggest you...

  • Click [u]Reply[/u]
  • Click [u]Attachments and other options[/u]
  • Click [u]Browse[/u]
  • Locate and select the image
  • Click [u]OK[/u]
  • Click [u]Post[/u]



Interesting idea to use 7zip to look at core.a, but it is the wrong sort of archive for 7zip I think. Surprised it works at all.

Anyway, the better way to look at .a files is with the command line tool “nm”. This tool is in the Arduino package, in C:\Programs\arduino-1.0.5-r2\hardware\tools\avr\avr\bin in my case.

Run it with “nm \core.a”

Yes, I've used 'nm' on Linux before, but have not installed Cygwin on my Windows machine yet. I'll give that a try.

In the meantime, I've set up my QT Creator environment to build the core for each sketch. I believe this is the way the Arduino IDE works, and saves the headache of maintaining separate library builds per API version/board pairing.

For those who are interested in using Arduino with Qt Creator, the project wizard lives here: