Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Hey, im having a nightmare, im learning to use QT and i've to use mysql in my application, so i got the mysql c++ connector following this guide https://dev.mysql.com/doc/connector-cpp/en/connector-cpp-apps-windows-visual-studio.html, so i realized that QT has one already, then i had to remove it, and now i get tons of errors compiling :(
theres some of these annoying errors
1>FacNo.obj : error LNK2001: unresolved external symbol "protected: virtual int __cdecl QTableView::horizontalOffset(void)const " (?horizontalOffset@QTableView@@MEBAHXZ)
1>FacNo.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl QTableView::horizontalScrollbarAction(int)" (?horizontalScrollbarAction@QTableView@@MEAAXH@Z)
1>FacNo.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl QAbstractItemView::horizontalScrollbarValueChanged(int)" (?horizontalScrollbarValueChanged@QAbstractItemView@@MEAAXH@Z)
1>FacNo.obj : error LNK2001: unresolved external symbol "public: virtual class QModelIndex __cdecl QTableView::indexAt(class QPoint const &)const " (?indexAt@QTableView@@UEBA?AVQModelIndex@@AEBVQPoint@@@Z)
1>FacNo.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl QAbstractItemView::inputMethodEvent(class QInputMethodEvent *)" (?inputMethodEvent@QAbstractItemView@@MEAAXPEAVQInputMethodEvent@@@Z)
I think that its something about the linker, but i dont know how to fix it :( thank you in advance, and sorry for my mediocre english
Hi and welcome to devnet,
What did you remove exactly ?
libmysql.lib from linker->general
mysqlcppconn-static.lib and libmysql.lib from linker->Additional Dependences
CPPCONN_PUBLIC_FUNC= from C++->Preprocessor Definitions
Strange, it looks completely unrelated to your problem.
Did you do a full rebuild of the project ?
Am I right that are you using Visual Studio to build your app rather than Qt Creator ?
Yes i did a full rebuild and yes, im using VS :)
Did you create the project directly in VS or do you have a .pro file ?
It was created directly in VS and everything worked fine til i removed the C++ connector
Then check whether there's not the widget module missing in your linker flags.
Ok, ill try to get some info because i have no idea how to do that