Error When compiling SmartservoGui
elthef opened this issue · 1 comments
I try to build the smartgui and this is the error return
where can I find the settingsaved() code
Thank you
Edwin
luen@luen-HP-EliteBook-840-G5:~/smart_motor/SmartServoFramework/SmartServoGui$ make
g++ -c -m64 -pipe -fPIE -pthread -Wno-unused-parameter -Wno-unused-variable -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtSvg -I/usr/include/qt4 -I.. -Ibuild -Ibuild -o build/mainwindow.o src/mainwindow.cpp
src/mainwindow.cpp: In constructor ‘MainWindow::MainWindow(QWidget*)’:
src/mainwindow.cpp:106:29: error: ‘void Settings::settingsSaved()’ is protected within this context
connect(stw, &Settings::settingsSaved, this, &MainWindow::reloadPortSettings);
Hi!
That's a weird error. settingsSaved() is a signal from the Settings class, in settings.h
I'm pretty sure this is because you are using Qt 4, wich is really not supported anymore...
You can try to replace this line in MainWindows.cpp line 106 :
QObject::connect(stw, SIGNAL(settingsSaved), this, SLOT(reloadPortSettings));
This should make it backward compatible, but there may be other instances of newer QObject::connect() or newer API. I'm pretty sure we need Qt 5.6 to build the latest SmartServoGUI.
If you really want to use Qt4 you can also try building older versions like 0.95 or maybe 0.97 from the release page : https://github.com/emericg/SmartServoFramework/releases
Let me know how that goes!