Search code examples
c++qtnetbeansmakefileqmake

Netbeans with Qt5: No rule to make target


I'm compile Qt5 project from NetBeans IDE 8.0.2.

I keep getting this error message:

make -f nbproject/Makefile-Release_Win32.mk QMAKE=/usr/bin/qmake SUBPROJECTS= .build-conf
/usr/bin/qmake VPATH=. -spec win32-g++ -o qttmp-Release_Win32.mk nbproject/qt-Release_Win32.pro
mv -f qttmp-Release_Win32.mk nbproject/qt-Release_Win32.mk
"make" -f nbproject/qt-Release_Win32.mk dist/Release_Win32/MinGW-w32-Linux-x86/Application
make[1]: Entering directory '/home/sabo/workspace/project1'
make[1]: *** No rule to make target 'dist/Release_Win32/MinGW-w32-Linux-x86/Application'.  Stop.
make[1]: Leaving directory '/home/sabo/workspace/project1'
nbproject/Makefile-Release_Win32.mk:65: recipe for target '.build-conf' failed
make: *** [.build-conf] Error 2

In file Makefile-Release_Win32.mk I have this build target:

.build-conf: ${BUILD_SUBPROJECTS} nbproject/qt-${CND_CONF}.mk
"${MAKE}" -f nbproject/qt-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/Application

But in file qt-Release_Win32.mk I have other target:

...
DESTDIR_TARGET = dist/Release_Win32/MinGW-w32-Linux-x86/Application.exe
...
$(DESTDIR_TARGET):  $(OBJECTS) build/Release_Win32/MinGW-w32-Linux-x86/Application_resource_res.o
$(LINKER) $(LFLAGS) -o $(DESTDIR_TARGET) $(OBJECTS)  $(LIBS)

How to cahnge DESTDIR_TARGET in auto-generated qt-Release_Win32.mk file?


Solution

  • As hotfix:

    In project settings: Set target as Application.exe

    And add Qt variable TARGET=Application

    It's work.