Nmake problems
-
I've put the path to bin directory for Qt, qmake works, i mean i type qmake -project, then qmake hello.pro for example but when i try to compile, when i type nmake i get this error:
Makefile.Debug(55) : fatal error U1088: invalid separator '::' on inference rule
Stop.
NMAKE : fatal error U1077: 'C:\Windows\system32\cmd.exe' : return code '0x2'
Stop.What could be the problem?
-
It was created by typing the command qmake qt.pro(hello.pro was in a tutorial); i didn't created myself
Here is the part were the problem appears(at {.}.cpp{debug}.obj::):
@
COPY = copy /y
COPY_FILE = $(COPY)
COPY_DIR = xcopy /s /q /y /i
DEL_FILE = del
DEL_DIR = rmdir
MOVE = move
CHK_DIR_EXISTS= if not exist
MKDIR = mkdir--
INSTALL_FILE = $(COPY_FILE)
INSTALL_PROGRAM = $(COPY_FILE)
INSTALL_DIR = $(COPY_DIR)####### Output directory
OBJECTS_DIR = debug
####### Files
SOURCES = qt1.cpp
OBJECTS = debug\qt1.obj
DIST =
QMAKE_TARGET = qt
DESTDIR = debug\ #avoid trailing-slash linebreak
TARGET = qt.exe
DESTDIR_TARGET = debug\qt.exe####### Implicit rules
.SUFFIXES: .c .cpp .cc .cxx
{.}.cpp{debug}.obj::
$(CXX) -c $(CXXFLAGS) $(INCPATH) -Fodebug\ @<<
$<
@
There are tabs at those rules, if in the ost you don't see it.[Edit] Code wrappings added, koahnig
-
I have added "code wrappings":http://developer.qt.nokia.com/wiki/ForumHelp#e3f82045ad0f480d3fb9e0ac2d58fb01 This should make it easier to read.
Please check, if it reflects what you see.Since you are using nmake, do you have a complete visual studio (non-express version) installed ?
-
You can install "vsaddin":http://qt.nokia.com/downloads/visual-studio-add-in then
You can import the pro directly to visual studio and run it from there.
I have done it with msvc 2005 and had no problems running the demo stuff. -
I have installed that addon on drive C, but i have installed Qt in drive E. Visual Studio is installed in drive C. I don't know what environment variable QTDIR is, but i have added to PATH the path to the bin directory of Qt(E:\QT\Desktop\Qt\4.8.0\msvc2010\bin)
-
Did you installed the Qt binaries from "here":http://qt.nokia.com/downloads/downloads#qt-lib ?
I would assume that this installer is setting up also the QTDIR environment variable.You may want to check in a cmd-box with
@set qt@
This will show you all your environment variables starting with qt. -
AFAIK mingw does not set this variable.
You have installed mingw only?
IMHO you should not use nmake for building.I think we have mixed up things a bit. Since you were using nmake, I thought that you are trying to use visual studio.
Certain mixing is possible, but we should not start with mixing everything.
What is the command you have used to install Qt?
Did you also install qt creator? -
I had an installer, i didn't use any command. Yes, I have installed qt creator. I saw in a tutorial that for
creating and running a project i have to use qmake and for windows nmake. I don't really care if I use Visual studio or command line, but i want to build my projects. So far it doesn't work, either with Visual studio or command line. I just need one way to build my programs. -
Well if you have installed also qt creator you can open any .pro file as a project file. From inside the creator you can edit, build and run/debug all applications in the same environment.
I have very, very minimal experience with creator and mingw on windows, but to my understanding there is a make shipped with mingw as well. i would suggest using nmake with visual studio and mingw with its make. Staying within the same tool chain shall help.
[edit] Or you may want to install the whole stuff for visual studio, if you want to stay there.