Arduino Development on QT

Hello

I am trying to setup a development environment on qt for programming on my arduino.
I can compile following code but when I try to run it I get "undefined reference " errors for the Arduino related method calls (like init(), pinMode() etc).

Apparently I have a linker problem. My project recognizes the header file but cannot link it to actual library.

What is the correct library to link against? My arduino (1.8.5) installation is under /opt in linux and has following high level structure:

Thanks in advance!

ard.png

As additional info, this is my pro file in QT:

#-------------------------------------------------

Project created by QtCreator

#-------------------------------------------------

SOURCES += main.cpp

HEADERS +=

DISTFILES +=
Makefile

INCLUDEPATH = /opt/arduino-1.8.5/hardware/arduino/avr/cores/arduino
/opt/arduino-1.8.5/libraries/Bridge/src
/opt/arduino-1.8.5/libraries/Esplora/src
/opt/arduino-1.8.5/libraries/Ethernet/src
/opt/arduino-1.8.5/libraries/Firmata/src
/opt/arduino-1.8.5/libraries/GSM/src
/opt/arduino-1.8.5/libraries/LiquidCrystal/src
/opt/arduino-1.8.5/libraries/Robot_Control/src
/opt/arduino-1.8.5/libraries/RobotIRremote/src
/opt/arduino-1.8.5/libraries/Robot_Motor/src
/opt/arduino-1.8.5/libraries/SD/src
/opt/arduino-1.8.5/libraries/Servo/src
/opt/arduino-1.8.5/libraries/SpacebrewYun/src
/opt/arduino-1.8.5/libraries/Stepper/src
/opt/arduino-1.8.5/libraries/Temboo/src
/opt/arduino-1.8.5/libraries/TFT/src
/opt/arduino-1.8.5/libraries/WiFi/src
/opt/arduino-1.8.5/hardware/arduino/avr/libraries/EEPROM
/opt/arduino-1.8.5/hardware/arduino/avr/libraries/SoftwareSerial
/opt/arduino-1.8.5/hardware/arduino/avr/libraries/SPI
/opt/arduino-1.8.5/hardware/arduino/avr/libraries/Wire
/opt/arduino-1.8.5/hardware/tools/avr/avr/include
/opt/arduino-1.8.5/hardware/arduino/avr/variants/standard

firim:
I am trying to setup a development environment on qt for programming on my arduino.

What is "qt"?

I can compile following code but when I try to run it I get "undefined reference " errors for the Arduino related method calls (like init(), pinMode() etc).

An Arduino does not provide run-time error messages unless you have written them into your Arduino code so what you say here does not make sense.

If you want to compile and upload Arduino code without using the Arduino IDE why not call the command-line version of the IDE?

...R