Trouble communicating APIs with my Qt GUI USB PCAN

This is a forum dedicated to discuss suggestions about the functionality of any software product as well as the study of new interesting ideas to develop

Trouble communicating APIs with my Qt GUI USB PCAN

Postby phuongdv » Tue 31. Jul 2018, 04:32

I recently bought a USB PCAN device. I am having trouble communicating APIs with my Qt GUI.

I'm using #include <libpcan.h> and #include <pcan.h> in my code as mentioned in a sample code. I'm compiling the code with the -lpcanfd compiler. When I add #include <libpcan.h> to the Qt header and compile my code, I get an error like this:

/usr/include/x86_64-linux-gnu/qt5/QtCore/qthread.h:53:16: error:
expected unqualified-id before 'void' static Qt :: HANDLE
currentThreadId () Q_DECL_NOTHROW;
If I comment #include <libpcan.h> the compilation process completes without error (s). Can anyone give me a solution? Excluding libpcant, I will not be able to use the device.
Posts: 1
Joined: Wed 11. Jul 2018, 08:32

Re: Trouble communicating APIs with my Qt GUI USB PCAN

Postby S.Grosjean » Tue 31. Jul 2018, 15:39


Can you give us an extract of your code, as well as the whole compilation cmd line and error message?

Generally speaking, you don't have to #include any <pcan.h> but only <libpcan.h> (or <libpcanfd.h>).

— Stéphane
User avatar
Software Development
Software Development
Posts: 234
Joined: Wed 4. Jul 2012, 16:02

Return to Suggestions & Feature Requests

This website uses cookies for analytics, for logins to the online shop and the forum, and for the handling of an order. By browsing this website you agree to the use of cookies. Detailed information on their use can be found in our privacy policy.

OKPrivacy Policy