On Windows 7.
Just installed Qt 5.1.1 and started recompiling my code.
I don't use QtDesigner. I use my own ui.h file.
Getting the following error:
:-1: error: No rule to make target 'bits.ui', needed by 'ui_bits.h'. Stop.
The ui header I use is named bits.ui.h, not ui_bits.h, which is what QtDesigner wants to use.
This all worked fine with Qt 4.8.
Here is my project file.
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = bits
TEMPLATE = app
SOURCES += main.cpp \
hexedit.cpp \
bits.cpp \
bitfield.cpp \
BitButton.cpp \
shiftop.cpp \
formatgroup.cpp
HEADERS += \
controlgroup.h \
bits.ui.h \
bits.h \
bitfield.h \
BitButton.h \
hexedit.h \
shiftop.h \
formatgroup.h
FORMS += \
bits.ui
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = bits
TEMPLATE = app
SOURCES += main.cpp \
hexedit.cpp \
bits.cpp \
bitfield.cpp \
BitButton.cpp \
shiftop.cpp \
formatgroup.cpp
HEADERS += \
controlgroup.h \
bits.ui.h \
bits.h \
bitfield.h \
BitButton.h \
hexedit.h \
shiftop.h \
formatgroup.h
FORMS += \
bits.ui
To copy to clipboard, switch view to plain text mode
I tried removing the FORMS += bits.ui from the project, but the error persists.
I'm certain it's an error on my part, but googling this error has been no help.
On Windows 7.
Just installed Qt 5.1.1 and started recompiling my code.
I don't use QtDesigner. I use my own ui.h file.
Getting the following error:
:-1: error: No rule to make target 'bits.ui', needed by 'ui_bits.h'. Stop.
The ui header I use is named bits.ui.h, not ui_bits.h, which is what QtDesigner wants to use.
This all worked fine with Qt 4.8.
Here is my project file.
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = bits
TEMPLATE = app
SOURCES += main.cpp \
hexedit.cpp \
bits.cpp \
bitfield.cpp \
BitButton.cpp \
shiftop.cpp \
formatgroup.cpp
HEADERS += \
controlgroup.h \
bits.ui.h \
bits.h \
bitfield.h \
BitButton.h \
hexedit.h \
shiftop.h \
formatgroup.h
FORMS += \
bits.ui
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = bits
TEMPLATE = app
SOURCES += main.cpp \
hexedit.cpp \
bits.cpp \
bitfield.cpp \
BitButton.cpp \
shiftop.cpp \
formatgroup.cpp
HEADERS += \
controlgroup.h \
bits.ui.h \
bits.h \
bitfield.h \
BitButton.h \
hexedit.h \
shiftop.h \
formatgroup.h
FORMS += \
bits.ui
To copy to clipboard, switch view to plain text mode
I tried removing the FORMS += bits.ui from the project, but the error persists.
I'm certain it's an error on my part, but googling this error has been no help.
Added after 1 47 minutes:
OK, I found the answer at this link.
http://qt-project.org/forums/viewthread/26181
The important part of the thread is this:
Rerun qmake (Build->Run qmake), or, if that fails, clean the output directory and rebuild your project.
Also make sure you have a QT += widgets in your .pro file. Qt5 moved widgets to separate library.
I had done all the other stuff, so it was Build->Run qmake that did it for me.
Bookmarks