2 Attachment(s)
Add hpp file to qt project
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.
Re: Add hpp file to qt project
It would be nice to see the first error you got.
Re: Add hpp file to qt project
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)
Re: Add hpp file to qt project
You didn't include all the necessary files.
Baumer_Capture_Test is nowhere defined in the files you posted.
Re: Add hpp file to qt project
I'm not sure, but you might need to set QMAKE_EXT_H variable. More is here.
Re: Add hpp file to qt project
Baumer_Capture_Test is the name of my Qt project. I just attached the files I am having troubles including.
Re: Add hpp file to qt project
Ruben,
Did you solve this problem? I am faced with it also.
Thanks,
Steve
Re: Add hpp file to qt project
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:
Code:
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.