Skip to content
This repository has been archived by the owner on May 24, 2023. It is now read-only.

Build Fails Mac & Linux #4

Open
willupowers opened this issue Jun 16, 2017 · 9 comments
Open

Build Fails Mac & Linux #4

willupowers opened this issue Jun 16, 2017 · 9 comments

Comments

@willupowers
Copy link

willupowers commented Jun 16, 2017

Will not build on Mac OS X El Capitan 10.11.6 or Ubuntu 17.04. Have tried Qt5.7 and Qt4 with version 2 and release 1.9.04. Appears to be the same unresolved issue experienced here in 2013.

I always get the same error:

users-iMac:monkey user$ qmake -r -spec macx-g++ && make && make install
Project MESSAGE: Building in RELEASE for Darwin-x86_64
Project MESSAGE: Generating src/main.h...
/usr/local/Cellar/[email protected]/5.7.1/bin/uic src/maininterface/ui/UIAbout.ui -o ../build/Darwin-x86_64/release/ui/ui_UIAbout.h
/usr/local/Cellar/[email protected]/5.7.1/bin/uic src/maininterface/ui/UISettings.ui -o ../build/Darwin-x86_64/release/ui/ui_UISettings.h
/usr/local/Cellar/[email protected]/5.7.1/bin/uic src/abbreviationsmanager/ui/UIAddAbbreviation.ui -o ../build/Darwin-x86_64/release/ui/ui_UIAddAbbreviation.h
/usr/local/Cellar/[email protected]/5.7.1/bin/uic src/templatesmanager/ui/UITemplatesWizard.ui -o ../build/Darwin-x86_64/release/ui/ui_UITemplatesWizard.h
/usr/local/Cellar/[email protected]/5.7.1/bin/uic src/pluginsmanager/ui/UIPluginsSettings.ui -o ../build/Darwin-x86_64/release/ui/ui_UIPluginsSettings.h
/usr/local/Cellar/[email protected]/5.7.1/bin/uic src/pluginsmanager/ui/UIPluginsSettingsElement.ui -o ../build/Darwin-x86_64/release/ui/ui_UIPluginsSettingsElement.h
/usr/local/Cellar/[email protected]/5.7.1/bin/uic src/pluginsmanager/ui/UIPluginsSettingsAbout.ui -o ../build/Darwin-x86_64/release/ui/ui_UIPluginsSettingsAbout.h
/usr/local/Cellar/[email protected]/5.7.1/bin/uic src/xupmanager/gui/UIXUPFindFiles.ui -o ../build/Darwin-x86_64/release/ui/ui_UIXUPFindFiles.h
/usr/local/Cellar/[email protected]/5.7.1/bin/uic src/xupmanager/gui/XUPProjectManager.ui -o ../build/Darwin-x86_64/release/ui/ui_XUPProjectManager.h
/usr/local/Cellar/[email protected]/5.7.1/bin/uic src/pluginsmanager/ui/UICLIToolSettings.ui -o ../build/Darwin-x86_64/release/ui/ui_UICLIToolSettings.h
/usr/local/Cellar/[email protected]/5.7.1/bin/uic src/workspace/pOpenedFileExplorer.ui -o ../build/Darwin-x86_64/release/ui/ui_pOpenedFileExplorer.h
/usr/local/Cellar/[email protected]/5.7.1/bin/uic src/xupmanager/gui/CommandsEditor.ui -o ../build/Darwin-x86_64/release/ui/ui_CommandsEditor.h
/usr/local/Cellar/[email protected]/5.7.1/bin/uic src/xupmanager/gui/VariablesEditor.ui -o ../build/Darwin-x86_64/release/ui/ui_VariablesEditor.h
/usr/local/Cellar/[email protected]/5.7.1/bin/uic src/xupmanager/gui/UIXUPEditor.ui -o ../build/Darwin-x86_64/release/ui/ui_UIXUPEditor.h
/usr/local/Cellar/[email protected]/5.7.1/bin/uic src/xupmanager/gui/FilesEditor.ui -o ../build/Darwin-x86_64/release/ui/ui_FilesEditor.h
/usr/local/Cellar/[email protected]/5.7.1/bin/uic src/xupmanager/gui/MainEditor.ui -o ../build/Darwin-x86_64/release/ui/ui_MainEditor.h
/usr/local/Cellar/[email protected]/5.7.1/bin/uic src/consolemanager/CommandEditor.ui -o ../build/Darwin-x86_64/release/ui/ui_CommandEditor.h
/Applications/Xcode.app/Contents/Developer/usr/bin/g++ -c -pipe -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -mmacosx-version-min=10.8 -stdlib=libc++ -std=c++11 -mmacosx-version-min=10.7 -O2 -std=gnu++11 -Wall -W -fPIC -DMONKEY_CORE_BUILD -DHAVE_REGCOMP -DHAVE_STDLIB_H -DHAVE_FGETPOS -DHAVE_SYS_STAT_H -DHAVE_FCNTL_H -DHAVE_REGEX -DHAVE_UNISTD_H -DHAVE_STRSTR -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_MACEXTRAS_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_SQL_LIB -DQT_CORE_LIB -I. -I../build/Darwin-x86_64/release/ui -Isrc -I../qscintilla/QScintilla-gpl-snapshot/include -I../qscintilla/QScintilla-gpl-snapshot/src -I../qscintilla/QScintilla-gpl-snapshot/lexers -I../qscintilla/QScintilla-gpl-snapshot/lexlib -I../qscintilla/QScintilla-gpl-snapshot/Qt4Qt5 -I../qscintilla/QScintilla-gpl-snapshot/Qt4Qt5/Qsci -I../fresh/objects -I../fresh/widgets -I../ctags/ctags -I../qCtagsSense/src -I/usr/local/Cellar/[email protected]/5.7.1/lib/QtPrintSupport.framework/Headers -I/usr/local/Cellar/[email protected]/5.7.1/lib/QtWidgets.framework/Headers -I/usr/local/Cellar/[email protected]/5.7.1/lib/QtMacExtras.framework/Headers -I/usr/local/Cellar/[email protected]/5.7.1/lib/QtGui.framework/Headers -I/usr/local/Cellar/[email protected]/5.7.1/lib/QtXml.framework/Headers -I/usr/local/Cellar/[email protected]/5.7.1/lib/QtSql.framework/Headers -I/usr/local/Cellar/[email protected]/5.7.1/lib/QtCore.framework/Headers -I../build/Darwin-x86_64/release/moc -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/AGL.framework/Headers -I../build/Darwin-x86_64/release/ui -I/usr/local/Cellar/[email protected]/5.7.1/mkspecs/macx-g++ -F/usr/local/Cellar/[email protected]/5.7.1/lib -o ../build/Darwin-x86_64/release/obj/UIAbout.o src/maininterface/ui/UIAbout.cpp
/Applications/Xcode.app/Contents/Developer/usr/bin/g++ -c -pipe -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -mmacosx-version-min=10.8 -stdlib=libc++ -std=c++11 -mmacosx-version-min=10.7 -O2 -std=gnu++11 -Wall -W -fPIC -DMONKEY_CORE_BUILD -DHAVE_REGCOMP -DHAVE_STDLIB_H -DHAVE_FGETPOS -DHAVE_SYS_STAT_H -DHAVE_FCNTL_H -DHAVE_REGEX -DHAVE_UNISTD_H -DHAVE_STRSTR -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_MACEXTRAS_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_SQL_LIB -DQT_CORE_LIB -I. -I../build/Darwin-x86_64/release/ui -Isrc -I../qscintilla/QScintilla-gpl-snapshot/include -I../qscintilla/QScintilla-gpl-snapshot/src -I../qscintilla/QScintilla-gpl-snapshot/lexers -I../qscintilla/QScintilla-gpl-snapshot/lexlib -I../qscintilla/QScintilla-gpl-snapshot/Qt4Qt5 -I../qscintilla/QScintilla-gpl-snapshot/Qt4Qt5/Qsci -I../fresh/objects -I../fresh/widgets -I../ctags/ctags -I../qCtagsSense/src -I/usr/local/Cellar/[email protected]/5.7.1/lib/QtPrintSupport.framework/Headers -I/usr/local/Cellar/[email protected]/5.7.1/lib/QtWidgets.framework/Headers -I/usr/local/Cellar/[email protected]/5.7.1/lib/QtMacExtras.framework/Headers -I/usr/local/Cellar/[email protected]/5.7.1/lib/QtGui.framework/Headers -I/usr/local/Cellar/[email protected]/5.7.1/lib/QtXml.framework/Headers -I/usr/local/Cellar/[email protected]/5.7.1/lib/QtSql.framework/Headers -I/usr/local/Cellar/[email protected]/5.7.1/lib/QtCore.framework/Headers -I../build/Darwin-x86_64/release/moc -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/AGL.framework/Headers -I../build/Darwin-x86_64/release/ui -I/usr/local/Cellar/[email protected]/5.7.1/mkspecs/macx-g++ -F/usr/local/Cellar/[email protected]/5.7.1/lib -o ../build/Darwin-x86_64/release/obj/UISettings.o src/maininterface/ui/UISettings.cpp
In file included from src/maininterface/ui/UISettings.cpp:19:
In file included from src/maininterface/ui/UISettings.h:25:
In file included from ../build/Darwin-x86_64/release/ui/ui_UISettings.h:40:
../fresh/widgets/pEnvironmentVariablesEditor.h:23:10: fatal error: 'ui_pEnvironmentVariablesEditor.h' file not found
#include "ui_pEnvironmentVariablesEditor.h"
^
1 error generated.
make: *** [../build/Darwin-x86_64/release/obj/UISettings.o] Error 1

Additionally Qt5.7 complains there is no C++11 support. To fix that I had to modify monkey.pro by adding:

QMAKE_CXXFLAGS += -stdlib=libc++
QMAKE_CXXFLAGS += -std=c++11
QMAKE_CXXFLAGS += -mmacosx-version-min=10.7
QMAKE_LFLAGS += -mmacosx-version-min=10.7

Finally the documentation for installation says to use:

qmake -r -spec macx-g++ && make aa make install

This throws missing "aa" build target. Assuming below is correct:

qmake -r -spec macx-g++ && make && make install

(Python2) users-iMac:monkey user$ qmake -r -spec macx-g++ && make && make install
Project MESSAGE: Building in RELEASE for Darwin-macosx
Project MESSAGE: Generating src/main.h...
src/resources/resources.qrc: Warning: potential duplicate alias detected: 'license.gpl'
/Users/user/anaconda/envs/Python2/bin/uic src/maininterface/ui/UIAbout.ui -o build/Darwin-macosx/release/ui/ui_UIAbout.h
/Users/user/anaconda/envs/Python2/bin/uic src/maininterface/ui/UISettings.ui -o build/Darwin-macosx/release/ui/ui_UISettings.h
/Users/user/anaconda/envs/Python2/bin/uic src/abbreviationsmanager/ui/UIAddAbbreviation.ui -o build/Darwin-macosx/release/ui/ui_UIAddAbbreviation.h
/Users/user/anaconda/envs/Python2/bin/uic src/templatesmanager/ui/UITemplatesWizard.ui -o build/Darwin-macosx/release/ui/ui_UITemplatesWizard.h
/Users/user/anaconda/envs/Python2/bin/uic src/pluginsmanager/ui/UIPluginsSettings.ui -o build/Darwin-macosx/release/ui/ui_UIPluginsSettings.h
/Users/user/anaconda/envs/Python2/bin/uic src/pluginsmanager/ui/UIPluginsSettingsElement.ui -o build/Darwin-macosx/release/ui/ui_UIPluginsSettingsElement.h
/Users/user/anaconda/envs/Python2/bin/uic src/pluginsmanager/ui/UIPluginsSettingsAbout.ui -o build/Darwin-macosx/release/ui/ui_UIPluginsSettingsAbout.h
/Users/user/anaconda/envs/Python2/bin/uic src/xupmanager/gui/UIXUPFindFiles.ui -o build/Darwin-macosx/release/ui/ui_UIXUPFindFiles.h
/Users/user/anaconda/envs/Python2/bin/uic src/xupmanager/gui/XUPProjectManager.ui -o build/Darwin-macosx/release/ui/ui_XUPProjectManager.h
/Users/user/anaconda/envs/Python2/bin/uic src/pluginsmanager/ui/UICLIToolSettings.ui -o build/Darwin-macosx/release/ui/ui_UICLIToolSettings.h
/Users/user/anaconda/envs/Python2/bin/uic src/workspace/pOpenedFileExplorer.ui -o build/Darwin-macosx/release/ui/ui_pOpenedFileExplorer.h
/Users/user/anaconda/envs/Python2/bin/uic src/xupmanager/gui/CommandsEditor.ui -o build/Darwin-macosx/release/ui/ui_CommandsEditor.h
/Users/user/anaconda/envs/Python2/bin/uic src/xupmanager/gui/VariablesEditor.ui -o build/Darwin-macosx/release/ui/ui_VariablesEditor.h
/Users/user/anaconda/envs/Python2/bin/uic src/xupmanager/gui/UIXUPEditor.ui -o build/Darwin-macosx/release/ui/ui_UIXUPEditor.h
/Users/user/anaconda/envs/Python2/bin/uic src/xupmanager/gui/FilesEditor.ui -o build/Darwin-macosx/release/ui/ui_FilesEditor.h
/Users/user/anaconda/envs/Python2/bin/uic src/xupmanager/gui/MainEditor.ui -o build/Darwin-macosx/release/ui/ui_MainEditor.h
/Users/user/anaconda/envs/Python2/bin/uic src/consolemanager/CommandEditor.ui -o build/Darwin-macosx/release/ui/ui_CommandEditor.h
g++ -c -pipe -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -arch i386 -Wall -W -DMONKEY_CORE_BUILD -DHAVE_REGCOMP -DHAVE_STDLIB_H -DHAVE_FGETPOS -DHAVE_SYS_STAT_H -DHAVE_FCNTL_H -DHAVE_REGEX -DHAVE_UNISTD_H -DHAVE_STRSTR -DQT_NO_DEBUG -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../anaconda/envs/Python2/mkspecs/macx-g++ -I. -I../../../anaconda/envs/Python2/include/qt/QtCore -I../../../anaconda/envs/Python2/include/qt/QtGui -I../../../anaconda/envs/Python2/include/qt/QtXml -I../../../anaconda/envs/Python2/include/qt/QtSql -I../../../anaconda/envs/Python2/include/qt -Ibuild/Darwin-macosx/release/ui -Isrc -I../qscintilla/QScintilla-gpl-snapshot/include -I../qscintilla/QScintilla-gpl-snapshot/src -I../qscintilla/QScintilla-gpl-snapshot/lexers -I../qscintilla/QScintilla-gpl-snapshot/lexlib -I../qscintilla/QScintilla-gpl-snapshot/Qt4Qt5 -I../qscintilla/QScintilla-gpl-snapshot/Qt4Qt5/Qsci -I../fresh/objects -I../fresh/widgets -I../ctags/ctags -I../qCtagsSense/src -Ibuild/Darwin-macosx/release/moc -Ibuild/Darwin-macosx/release/ui -o build/Darwin-macosx/release/obj/UIAbout.o src/maininterface/ui/UIAbout.cpp
g++ -c -pipe -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -arch i386 -Wall -W -DMONKEY_CORE_BUILD -DHAVE_REGCOMP -DHAVE_STDLIB_H -DHAVE_FGETPOS -DHAVE_SYS_STAT_H -DHAVE_FCNTL_H -DHAVE_REGEX -DHAVE_UNISTD_H -DHAVE_STRSTR -DQT_NO_DEBUG -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../anaconda/envs/Python2/mkspecs/macx-g++ -I. -I../../../anaconda/envs/Python2/include/qt/QtCore -I../../../anaconda/envs/Python2/include/qt/QtGui -I../../../anaconda/envs/Python2/include/qt/QtXml -I../../../anaconda/envs/Python2/include/qt/QtSql -I../../../anaconda/envs/Python2/include/qt -Ibuild/Darwin-macosx/release/ui -Isrc -I../qscintilla/QScintilla-gpl-snapshot/include -I../qscintilla/QScintilla-gpl-snapshot/src -I../qscintilla/QScintilla-gpl-snapshot/lexers -I../qscintilla/QScintilla-gpl-snapshot/lexlib -I../qscintilla/QScintilla-gpl-snapshot/Qt4Qt5 -I../qscintilla/QScintilla-gpl-snapshot/Qt4Qt5/Qsci -I../fresh/objects -I../fresh/widgets -I../ctags/ctags -I../qCtagsSense/src -Ibuild/Darwin-macosx/release/moc -Ibuild/Darwin-macosx/release/ui -o build/Darwin-macosx/release/obj/UISettings.o src/maininterface/ui/UISettings.cpp
In file included from src/maininterface/ui/UISettings.cpp:19:
In file included from src/maininterface/ui/UISettings.h:25:
In file included from build/Darwin-macosx/release/ui/ui_UISettings.h:40:
../fresh/widgets/pEnvironmentVariablesEditor.h:23:10: fatal error:
'ui_pEnvironmentVariablesEditor.h' file not found
#include "ui_pEnvironmentVariablesEditor.h"
^
1 error generated.
make: *** [build/Darwin-macosx/release/obj/UISettings.o] Error 1

user@nix:~/Documents/GitHub/mks2/monkey$ qmake -r && make
Project MESSAGE: Building in RELEASE for Linux-x86_64
Project MESSAGE: Generating src/main.h...
src/resources/resources.qrc: Warning: potential duplicate alias detected: 'license.gpl'
/usr/lib/x86_64-linux-gnu/qt4/bin/uic src/maininterface/ui/UIAbout.ui -o ui_UIAbout.h
/usr/lib/x86_64-linux-gnu/qt4/bin/uic src/maininterface/ui/UISettings.ui -o ui_UISettings.h
/usr/lib/x86_64-linux-gnu/qt4/bin/uic src/abbreviationsmanager/ui/UIAddAbbreviation.ui -o ui_UIAddAbbreviation.h
/usr/lib/x86_64-linux-gnu/qt4/bin/uic src/templatesmanager/ui/UITemplatesWizard.ui -o ui_UITemplatesWizard.h
/usr/lib/x86_64-linux-gnu/qt4/bin/uic src/pluginsmanager/ui/UIPluginsSettings.ui -o ui_UIPluginsSettings.h
/usr/lib/x86_64-linux-gnu/qt4/bin/uic src/pluginsmanager/ui/UIPluginsSettingsElement.ui -o ui_UIPluginsSettingsElement.h
/usr/lib/x86_64-linux-gnu/qt4/bin/uic src/pluginsmanager/ui/UIPluginsSettingsAbout.ui -o ui_UIPluginsSettingsAbout.h
/usr/lib/x86_64-linux-gnu/qt4/bin/uic src/xupmanager/gui/UIXUPFindFiles.ui -o ui_UIXUPFindFiles.h
/usr/lib/x86_64-linux-gnu/qt4/bin/uic src/xupmanager/gui/XUPProjectManager.ui -o ui_XUPProjectManager.h
/usr/lib/x86_64-linux-gnu/qt4/bin/uic src/pluginsmanager/ui/UICLIToolSettings.ui -o ui_UICLIToolSettings.h
/usr/lib/x86_64-linux-gnu/qt4/bin/uic src/workspace/pOpenedFileExplorer.ui -o ui_pOpenedFileExplorer.h
/usr/lib/x86_64-linux-gnu/qt4/bin/uic src/xupmanager/gui/CommandsEditor.ui -o ui_CommandsEditor.h
/usr/lib/x86_64-linux-gnu/qt4/bin/uic src/xupmanager/gui/VariablesEditor.ui -o ui_VariablesEditor.h
/usr/lib/x86_64-linux-gnu/qt4/bin/uic src/xupmanager/gui/UIXUPEditor.ui -o ui_UIXUPEditor.h
/usr/lib/x86_64-linux-gnu/qt4/bin/uic src/xupmanager/gui/FilesEditor.ui -o ui_FilesEditor.h
/usr/lib/x86_64-linux-gnu/qt4/bin/uic src/xupmanager/gui/MainEditor.ui -o ui_MainEditor.h
/usr/lib/x86_64-linux-gnu/qt4/bin/uic src/consolemanager/CommandEditor.ui -o ui_CommandEditor.h
g++ -c -m64 -pipe -O2 -D_REENTRANT -Wall -W -DSYSTEM_QSCINTILLA -DMONKEY_CORE_BUILD -DHAVE_REGCOMP -DHAVE_STDLIB_H -DHAVE_FGETPOS -DHAVE_SYS_STAT_H -DHAVE_FCNTL_H -DHAVE_REGEX -DHAVE_UNISTD_H -DHAVE_STRSTR -DQT_NO_DEBUG -DQT_SQL_LIB -DQT_XML_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/QtXml -I/usr/include/qt4/QtSql -I/usr/include/qt4 -Isrc -I/usr/include/qt4/Qsci -I../fresh/objects -I../fresh/widgets -I../ctags/ctags -I../qCtagsSense/src -I/usr/X11R6/include -I. -I. -o UIAbout.o src/maininterface/ui/UIAbout.cpp
g++ -c -m64 -pipe -O2 -D_REENTRANT -Wall -W -DSYSTEM_QSCINTILLA -DMONKEY_CORE_BUILD -DHAVE_REGCOMP -DHAVE_STDLIB_H -DHAVE_FGETPOS -DHAVE_SYS_STAT_H -DHAVE_FCNTL_H -DHAVE_REGEX -DHAVE_UNISTD_H -DHAVE_STRSTR -DQT_NO_DEBUG -DQT_SQL_LIB -DQT_XML_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/QtXml -I/usr/include/qt4/QtSql -I/usr/include/qt4 -Isrc -I/usr/include/qt4/Qsci -I../fresh/objects -I../fresh/widgets -I../ctags/ctags -I../qCtagsSense/src -I/usr/X11R6/include -I. -I. -o UISettings.o src/maininterface/ui/UISettings.cpp
In file included from ./ui_UISettings.h:40:0,
from src/maininterface/ui/UISettings.h:25,
from src/maininterface/ui/UISettings.cpp:19:
../fresh/widgets/pEnvironmentVariablesEditor.h:23:44: fatal error: ui_pEnvironmentVariablesEditor.h: No such file or directory
#include "ui_pEnvironmentVariablesEditor.h"
^
compilation terminated.
Makefile:1026: recipe for target 'UISettings.o' failed
make: *** [UISettings.o] Error 1

@willupowers willupowers changed the title Mac Build Issue El Capitan 10.11.6 Build Fails Mac & Linux Jun 17, 2017
@pasnox
Copy link
Owner

pasnox commented Jun 18, 2017 via email

@willupowers
Copy link
Author

Thanks for the response.

Am I missing something to make a successful build? I did try building v1.9.04 too, and I received the same error. Should I be building on Windows or an older version of Mac/Linux?

@pasnox
Copy link
Owner

pasnox commented Jun 20, 2017 via email

@pasnox
Copy link
Owner

pasnox commented Jun 20, 2017 via email

@willupowers
Copy link
Author

willupowers commented Jun 20, 2017

It seems there may be an include for an incorrect file name in "pEnvironmentVariablesEditor.h". There is no "ui_pEnvironmentVariablesEditor.h" that I can find.

#include "ui_pEnvironmentVariablesEditor.h"

It appears commenting this out or changing to:

#include "pEnvironmentVariablesEditor.h"

will move the build forward but only until the next couple lines in the header file

In file included from ../build/Darwin-x86_64/release/ui/ui_UISettings.h:40:
../fresh/widgets/pEnvironmentVariablesEditor.h:28:76: error: use of undeclared identifier 'Ui'
class Q_MONKEY_EXPORT pEnvironmentVariablesEditor : public QWidget, public Ui::pEnvironmentVariablesEditor
^
../fresh/widgets/pEnvironmentVariablesEditor.h:28:80: error: expected class name
class Q_MONKEY_EXPORT pEnvironmentVariablesEditor : public QWidget, public Ui::pEnvironmentVariablesEditor
^
2 errors generated.
make: *** [../build/Darwin-x86_64/release/obj/UISettings.o] Error 1

To line 26:

22 #include "MonkeyExport.h"
23 #include "ui_pEnvironmentVariablesEditor.h"
24 #include "pEnvironmentVariablesModel.h"
25
26 class Q_MONKEY_EXPORT pEnvironmentVariablesEditor : public QWidget, public Ui::pEnvironmentVariablesEditor

@pasnox
Copy link
Owner

pasnox commented Jun 20, 2017 via email

@willupowers
Copy link
Author

willupowers commented Jun 20, 2017

Ah. That clears things up a little. But unlike this issue, for some reason it appears I'm not getting a generated ui_pEnvironmentVariablesEditor.h in my build/.../ui folder.. which would explain the no such file or directory error. I'm very inexperienced, but I'm not sure forcing an INCLUDEPATH to the UI build folder will do anything when that file appears to not be generated.

Also FYI, I get the exact same error when building in Windows too

@SlySven
Copy link

SlySven commented Oct 31, 2017

This may be a long shot but if I recall correctly the Qt Creator IDE has three different means of specifying how the UI header files get included and getting the setting wrong can play havok that sounds a little like what you are getting - I found this out the hard way when I tweaked this for a large project I code for and found that there were a couple of forms that were rigged to use a different embedding system to the rest and the project didn't compile until I re-organised the inheritance and #includes a bit...

screenshot - 311017 - 18 01 16

Sorry I can't be more specific but it might be worth reading up on in the Qt documentation, whether it is something that qmake handles or your IDE will have to I do not know...

@SlySven
Copy link

SlySven commented Nov 1, 2017

Got it, read about this at Qt Designer using a Ui file and compare and contrast the use of:

  • (Single) Aggregated Inheritance case:
    • Derived (inherits) from probably a QWidget...
    • #include "ui_myform.h" in the header of the class using the form
    • FORMS += myForm.h in the qmake project file
    • MyForm class declaration includes a private: Ui::CalculatorForm ui; instance
    • MyForm class definition constructor starts off with a ui.setup(this);
  • (Single) Aggregated Inheritance as a Pointer case:
    • Derived (inherits) from probably a QWidget...
    • Has a namespace Ui { class MyForm; }
    • MyForm class definition needs a virtual destructor, i.e. virtual ~MyForm{};
    • MyForm class definition includes a private: Ui::CalculatorForm * ui; pointer to instance
    • MyForm class definition constructor starts off with a ui->setup(this);
    • MyForm class definition includes a destructor MyForm::~MyForm() { delete ui; }
  • Multiple Inheritance case:
    • Derived (inherits) from probably a QWidget AND Ui::MyForm...
    • #include "ui_myform.h" in the header of the class using the form
    • FORMS += myForm.h in the qmake project file
    • MyForm class definition constructor starts off with a setup(this);

Maybe that will help you to work out which you have and which it should be - if you do change things it might be a good idea to clear out all the ui_*.h and moc_* files from the build directory as well, as make clean may not catch all of them after a qmake run rebuilds the Makefile and forgets about some of them...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants