Target pattern error (Qt4.85 on Mojave 10.14.6)
-
@SGaist said in Target pattern error (Qt4.85 on Mojave 10.14.6):
Please show your current .pro file.
Original .pro
QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = One TEMPLATE = app SOURCES += main.cpp\ mainwindow.cpp HEADERS += mainwindow.h FORMS += mainwindow.ui
This is kits selection, It says Mkspec not fond, I gave the full path in Qt mkspec.
This is compile output
Makefile:111: target `all' doesn't match the target pattern Makefile:117: *** target pattern contains no `%'. Stop. 18:36:58: The process "/usr/bin/make" exited with code 2. Error while building/deploying project Sample43 (kit: 4.85) When executing step "Make"
I think there is : in Makefile 117 line, at this place /Makefile:
/%{JS:\ Util.asciify(build-Sample43-4_85-Release)}/Makefile: ../Sample43/Sample43.pro
-
I would first fix the mkspecs error.
But seeing the size of your project, you should really consider moving to Qt 5 or even 6 for that matter. Qt 4 has reached end of life a long time ago.
-
I would first fix the mkspecs error.
But seeing the size of your project, you should really consider moving to Qt 5 or even 6 for that matter. Qt 4 has reached end of life a long time ago.
@SGaist said in Target pattern error (Qt4.85 on Mojave 10.14.6):
I would first fix the mkspecs error.
But seeing the size of your project, you should really consider moving to Qt 5 or even 6 for that matter. Qt 4 has reached end of life a long time ago.
This app having qt4 API, on qt5 and over this API changed to QMultimedia,
Need to test this app without porting. -
Did you try to build your application directly on the command line ?
-
Made the build directory and project directory same, now door is different.
/usr/local/bin/uic mainwindow.ui -o ui_mainwindow.h make: /usr/local/bin/uic: No such file or directory make: *** [ui_mainwindow.h] Error 1 09:16:04: The process "/usr/bin/make" exited with code 2. Error while building/deploying project One (kit: 4.85) When executing step "Make"
Copied the pic in /usr/local/bin, Now, I get.
/Users/vm/Documents/Qt-Apps/One/mainwindow.h:4: error: 'QMainWindow' file not found #include <QMainWindow> ^~~~~~~~~~~~~
Tried with , this also same error.
#include <QtGui/QMainWindow>
-
Your Qt installation seems to be broken. Are you sure you selected the correct package from brew ?
-
Your Qt installation seems to be broken. Are you sure you selected the correct package from brew ?
-
Your Qt installation seems to be broken. Are you sure you selected the correct package from brew ?
-
Did you check what this segmentation fault is about ?
-
@SGaist
$ ./randomimage
"Creating tile at index 0"
2020-12-26 15:55:10.821 randomimage[1161:44993] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
"MediaTile::setMediaName: /Users/vk/Downloads/one/randomimage.app/Contents/Frameworks/QtGui.framework/Versions/4/QtGui"
Segmentation fault: 11Do you think tweak is possible or Phonon4Qt5 will help in porting.
Able to compiled Phonon4Qt5 on Mojave, in .pro added
QT += core gui phonon4qt5 LIBS += /Users/vk/Documents/port-qt4/phonon-master/build5/bin INCLUDEPATH += /Users/vk/Documents/port-qt4/phonon-master/phonon
but raised error,
Project ERROR: Unknown module(s) in QT: phonon4qt5 -
@SGaist
After changing the lib, include paths and with qt_phonon4qt5.pri coping to modules.able to compile, but it crashes,
This is happing because of
QKeySequence key = shortcut_it.key(); // Connect every shortcut with the setFocus slot, to ensure proper focus. connect( shortcut, SIGNAL( activated() ), this , SLOT( setFocus() ), Qt::UniqueConnection ); switch ( key )
/src/main/mainwindow.cpp:223: error: statement requires expression of integer type ('QKeySequence' invalid) switch ( key ) ^ ~~~
-
That's invalid C++ code. You cannot switch on a type like that.
What do the cases contain ?
-
That's invalid C++ code. You cannot switch on a type like that.
What do the cases contain ?
@SGaist
This works fine on older version, On Win7 worked without errorQShortcut* shortcut = shortcut_it.value().get(); QKeySequence key = shortcut_it.key(); switch ( key ) { case Qt::Key_F: connect( shortcut, SIGNAL( activated() ), this , SLOT( on_actionFull_Screen_triggered() ) ); break; case Qt::Key_Escape: connect( shortcut, SIGNAL( activated() ), this , SLOT( on_actionExit_triggered() ) ); break; default : break; }
-
That was just luck. The current error you get is correct.