PDA

View Full Version : Add hpp file to qt project



ruben.rodrigues
12th November 2010, 06:40
Hi all!

I need to include a hpp file and use a ".so" with the QLibrary class. I have some experience with the QLibrary class but I can't #include the hpp file as it show on the documentation of the product. It gives me almost 500 errors on external files and I can't find a solution. Probably I just have to change something in my pro file..

The files are attached to this thread.

thanks in advance.

tbscope
12th November 2010, 07:09
It would be nice to see the first error you got.

ruben.rodrigues
12th November 2010, 07:14
on the documentation says to include the file bgapi.hpp. When I do that I get the following errors 440 times:

expected constructor, destructor, or type conversion before ‘(’ token Baumer_Capture_Test line 100, external location: /esp/BaumerDrivers/include/bgapi.h C/C++ Problem
expected `)' before ‘*’ token Baumer_Capture_Test line 101, external location: /esp/BaumerDrivers/include/bgapi.hpp C/C++ Problem

There are some other errors but all in those external files (bgapi.hpp and bgapi.h)

tbscope
12th November 2010, 07:20
You didn't include all the necessary files.

Baumer_Capture_Test is nowhere defined in the files you posted.

lyuts
12th November 2010, 07:22
I'm not sure, but you might need to set QMAKE_EXT_H variable. More is here (http://doc.qt.nokia.com/4.7/qmake-environment-reference.html#extensions).

ruben.rodrigues
12th November 2010, 07:30
Baumer_Capture_Test is the name of my Qt project. I just attached the files I am having troubles including.

sbcagle
22nd December 2010, 15:14
Ruben,

Did you solve this problem? I am faced with it also.

Thanks,
Steve

ChrisW67
22nd December 2010, 22:05
The third party header files assume the _GNULINUX symbol is defined on Linux boxes. I don't have access to the documentation for the library but I would be surprised if this is not in the shipped documentation. All the OP needs to do is add:


DEFINES += _GNULINUX

to the project PRO file to get past these compile errors. Link errors, which I'm sure are the next question, are fixed by getting LIBS right.