How do I include a .cpp/.h file pair in qnx momentics?

338 Views Asked by At

Im new to QNX and and not experienced with larger software projects in general. Im trying to include the tinyXML2 library into my QNX Momentics project. I have the .cpp and the .h file of the library but I dont understand how I should correctly include these files into my project so they can be referenced from my main code(included with an #include statement)

hope someone can help

thanks

2

There are 2 best solutions below

0
Dmitry Tabakov On BEST ANSWER
  1. First you should put library source files (*.cpp and *.h) into /src/ for library building.
  2. When you need to use this library in your project - just #include "library_name/lib.h" library header.
0
Pasha M. On

For Ubuntu users, you need to download and copy both the files (tinyxml2.h, tinyxml2.cpp) into /usr/include directory to resolve the error.