I have a routine in my MainWindow, and I declared public this routine:
In MainWindow.cpp
Code:
void MainWindow::Read_Ambiente() { }
In MainWindow.h
Code:
public: void Read_Ambiente();
In another form I want to use this routine:
In Diagnostica.cpp
Code:
#include "mainwindow.h" extern void Read_Ambiente();
If I don't use this routine "Read_Ambiente" in the second form, there are no errors.
When I use the routine, I have this error from the linker:
diagnostica.obj:-1: error: LNK2019: unresolved external symbol "void __cdecl Read_Ambiente(void)" (?Read_Ambiente@@YAXXZ) referenced in function "private: virtual bool __thiscall Diagnostica::eventFilter(class QObject *,class QEvent *)" (?eventFilter@Diagnostica@@EAE_NPAVQObject@@PAVQEv ent@@@Z)

