Hi friends,

I'm currently trying to use an external c/c++ api in Qt Creator. Its an NASA api to calculate Spacecraft and planetary trajectories. http://naif.jpl.nasa.gov/naif/toolkit.html

I just created a new widget project and edited the project file ,this is what is looks like.

Qt Code:
  1. QT += core gui
  2.  
  3. greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
  4.  
  5. TARGET = qt_spice
  6.  
  7. TEMPLATE = app
  8.  
  9. SOURCES += main.cpp\
  10. mainwindow.cpp\
  11. $$PWD/cspice/src/cspice/*
  12.  
  13. HEADERS += mainwindow.h\
  14.   $$PWD/cspice/include/*
  15.  
  16. INCLUDEPATH += $$PWD/cspice/include/
  17.  
  18. LIBS += -lm
To copy to clipboard, switch view to plain text mode 

This is what my project tree looks like:

project tree.png

I included the api in my main.cpp and the indexing recognizes it.

Qt Code:
  1. #include "mainwindow.h"
  2. #include <QApplication>
  3. #include "SpiceUsr.h"
  4.  
  5. int main(int argc, char *argv[])
  6. {
  7. QApplication a(argc, argv);
  8. MainWindow w;
  9. w.show();
  10.  
  11. return a.exec();
  12. }
To copy to clipboard, switch view to plain text mode 

I have used this api on this machine in the eclipse ide so the compilers are working fine.
When i try to compile i hit this problem (Compile Output):

Qt Code:
  1. 16:32:32: Running steps for project qt_spice...
  2. 16:32:32: Configuration unchanged, skipping qmake step.
  3. 16:32:32: Starting: "/usr/bin/make"
  4. /home/gordon/Qt/5.5/gcc_64/bin/qmake -spec linux-g++ CONFIG+=debug -o Makefile ../qt_spice/qt_spice.pro
  5. gcc -c -pipe -g -Wall -W -D_REENTRANT -fPIC -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../qt_spice -I. -I../qt_spice/cspice/include -I../../5.5/gcc_64/include -I../../5.5/gcc_64/include/QtWidgets -I../../5.5/gcc_64/include/QtGui -I../../5.5/gcc_64/include/QtCore -I. -I../../5.5/gcc_64/mkspecs/linux-g++ -o mkprodct.o ../qt_spice/cspice/src/cspice/mkprodct.csh
  6. gcc: warning: ../qt_spice/cspice/src/cspice/mkprodct.csh: linker input file unused because linking not done
  7. gcc -c -pipe -g -Wall -W -D_REENTRANT -fPIC -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../qt_spice -I. -I../qt_spice/cspice/include -I../../5.5/gcc_64/include -I../../5.5/gcc_64/include/QtWidgets -I../../5.5/gcc_64/include/QtGui -I../../5.5/gcc_64/include/QtCore -I. -I../../5.5/gcc_64/mkspecs/linux-g++ -o rawio.o ../qt_spice/cspice/src/cspice/rawio.h
  8. ../qt_spice/cspice/src/cspice/rawio.h:20:27: error: unknown type name 'size_t'
  9. extern int read(int,void*,size_t), write(int,void*,size_t);
  10. ^
  11. ../qt_spice/cspice/src/cspice/rawio.h:24:1: error: unknown type name 'FILE'
  12. extern FILE *fdopen(int, const char*);
  13. ^
  14. make: *** [rawio.o] Error 1
  15. 16:32:39: The process "/usr/bin/make" exited with code 2.
  16. Error while building/deploying project qt_spice (kit: Desktop Qt 5.5.1 GCC 64bit)
  17. When executing step "Make"
  18. 16:32:39: Elapsed time: 00:07.
To copy to clipboard, switch view to plain text mode 

am i making a newbie mistake? have i missed something? Can anyone point me in the right direction? If more information is needed im glad to provide it I've been messing around with this problem for the last 3 days and im lightly frustrated thx in advance!