CoCreateInstance() in Qt5.9
-
wrote on 14 Mar 2018, 00:14 last edited by
Recently I needed to use mx-component to write/read PLC(the interface is implemented with Qt.)
After I finish the code, it come across one error.(Qt5.9 - Kit MSVC 2017 + Windows10)
I tried to delete the Build-..-Debug folder, but no use.
It's a question of lib? I don't know. The whole Qt project is below here, it's a tiny project.
CoCreateInstance() is located in file plc_widget.cpp - line 49.
Please note that I include the mx-component files in project, and the files is located in my own local PC, so if you run it directly,...will get more than one error.
-
Recently I needed to use mx-component to write/read PLC(the interface is implemented with Qt.)
After I finish the code, it come across one error.(Qt5.9 - Kit MSVC 2017 + Windows10)
I tried to delete the Build-..-Debug folder, but no use.
It's a question of lib? I don't know. The whole Qt project is below here, it's a tiny project.
CoCreateInstance() is located in file plc_widget.cpp - line 49.
Please note that I include the mx-component files in project, and the files is located in my own local PC, so if you run it directly,...will get more than one error.
hi @Limer,
it's a linker error, so either you don't link against the lib containing this symbol or the linker cannot find the lib file.
edit: it's ole32.lib, try adding
LIBS += ole32
to your .pro file -
wrote on 14 Mar 2018, 07:22 last edited by
Success! Thanks.
1/3