开发者

unable to call c++ functions in qt

I have a shared library of the C++ application and I am able to call it using the test app. I want to write a Qt UI for this. I am not able to call the C++ functio开发者_开发百科ns directly. Only if I give name mangled function name it works. Also if I create an object of the C++ class and call a function of the class I am getting "undefined reference to " the function. How can I call the C++ functions and create objects of C++ class and call functions on them?


You must include the path to the headers files. To do this in Qt Creator, modify your .pro file to include the following line:

INCLUDEPATH += path/to/header/files

you will notice that you MUST use the slash above... If you try using '\', it will not work.


It sounds like you're not correctly including the header files for the code you want to use. The "extra" features of QT don't stop all of the normal C++ features from working.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜