Important: Please read the Qt Code of Conduct -

Nmake problems

  • I've put the path to bin directory for Qt, qmake works, i mean i type qmake -project, then qmake 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

    NMAKE : fatal error U1077: 'C:\Windows\system32\cmd.exe' : return code '0x2'

    What could be the problem?

  • welcome to devnet

    You need to post the makefile. Otherwise it may be hard to know what went wrong.

  • It was created by typing the command qmake 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_DIR = xcopy /s /q /y /i
    DEL_FILE = del
    DEL_DIR = rmdir
    MOVE = move
    CHK_DIR_EXISTS= if not exist
    MKDIR = mkdir--

    ####### Output directory

    OBJECTS_DIR = debug

    ####### Files

    SOURCES = qt1.cpp
    OBJECTS = debug\qt1.obj
    DIST =
    DESTDIR = debug\ #avoid trailing-slash linebreak
    TARGET = qt.exe
    DESTDIR_TARGET = debug\qt.exe

    ####### Implicit rules

    .SUFFIXES: .c .cpp .cc .cxx

    $(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": 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 ?

  • Yes I have. Visual studio 2010 professional

  • You can install "vsaddin": 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.

  • When i try to create or open a qt project with visual studio i get this error:
    Cannot find qmake. Make sure you have specified a Qt version.
    I've installed the program that you said @koahnig

  • How did you install Qt on your machine?
    Do you have an environment variable QTDIR somewhere?

  • 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": ?
    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.

  • I have installed minGW but it still doesn't work. When i installed it said to me that the g++ compiler doesn't exist in the folder i was installing.

    C:\Users\Alex>set qt
    Environment variable qt not defined

  • 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.

Log in to reply