Make produce errors



  • Hello there.
    I'm a beginner Qt,and I'm following this tutorial http://qt-project.org/doc/qt-4.8/gettingstartedqt.html
    When I write qmake -project in command prompt it works fine and then write qmake it works fine too and I find some file generated in the folder that have the .cpp file, but when I write make I have errors !http://img688.imageshack.us/img688/765/83308195.png('make' is not recognized as an external or internal commad, bla bla bla)!

    Note: I working in windows 7 as you can see from the pic.



  • As i see you use the default install of Qt SDK, this uses (on Windows) MingW compiler and then the make command becomes: mingw32-make
    //if you build with Visual C++ the command will be nmake



  • Thanks Zlatomir That fixed the problem, but I've another problem, that when I open the program on qt creator it works, but when I run it directly from the .exe file I got error message that say minwgm10.dll is missing



  • You have two solution for this issue:

    1. Add to environment variable Path the path to the bin folder from the MinGW instalation (something like: C:\QtSDK\mingw\bin ) and also you will later need something like C:\QtSDK\Desktop\Qt\4.7.4\mingw\bin so that the Qt dll's to be found.
      //the different paths are separated by ; - so be careful when you edit that

    2. Copy the required dll's into the same folder with the .exe file - you need two from mingw bin folder, one for each Qt module that you use and maybe some plugins (eg for images)

    The second option is better since you "get ready" for the moment when you will deploy your app to a computer without Qt installed ;)

    You can read more "here":http://qt-project.org/doc/qt-4.8/deployment-windows.html it tells you also about static linkage - but the LGPL license has some restrictions for that so you can ignore stuff about static, at least while you are learning (and also you need to configure and rebuild the static Qt framework)



  • Actually I have been following the second solution when I wrote the last reply, but I couldn't complete it because. @configure -static @

    didn't work for me,and I had a message saying
    configure is not recognized as an internal or external command
    But When I tried your first solution it did work.
    So Thank you very much Zlatomir.



  • I think you misunderstand me, so: configure -static wasn't the second solution, or at least i didn't recommended it as a solution, i wrote about it for you to avoid it (at least for now) mainly because of: 1) you need to build the Qt framework statically and 2) as far as i know the LGPL license has some restrictions.

    So my recommended solution is to copy the .dll files in the same folder as your .exe file - and this will also teach you what to put in the "installer" when you will make the application ready to use by friends (or clients) on systems that don't have Qt installed and in path.



  • OK I've got your idea , but its seems that I'm gonna have lots of trouble as I'm still beginner.
    So my next problem is as follow:
    When I try to build the (Toys:Clocks Example) from the Qt creator Demos and Examples, I get errors
    Here is the compile output:

    12:13:52: Running build steps for project clocks...
    12:13:52: Configuration unchanged, skipping qmake step.
    12:13:52: Starting: "C:\QtSDK\mingw\bin\mingw32-make.exe"
    C:/QtSDK/mingw/bin/mingw32-make.exe -f Makefile.Debug
    mingw32-make.exe[1]: Entering directory C:/QtSDK/Examples/4.7/declarative/toys/clocks-build-desktop-Qt_4_8_0_for_Desktop_-_MinGW__Qt_SDK__Debug' Copying application data... mingw32-make.exe[1]: Leaving directoryC:/QtSDK/Examples/4.7/declarative/toys/clocks-build-desktop-Qt_4_8_0_for_Desktop_-_MinGW__Qt_SDK__Debug'
    'xcopy' is not recognized as an internal or external command,
    operable program or batch file.
    mingw32-make.exe[1]: *** [copydeploymentfolders] Error 1
    mingw32-make.exe: *** [debug] Error 2
    12:13:52: The process "C:\QtSDK\mingw\bin\mingw32-make.exe" exited with code 2.
    Error while building project clocks (target: Desktop)
    When executing build step 'Make'

    And this is not just in the previous example it's also in many others.
    Thanks



  • Good that you understood what i said, i thought i didn't said clear enough.

    As for your later problem is possible that you deleted by mistake the %SystemRoot%\system32; path when (if) you edited path from environment variables? Anyway start from there and see that you have that and the different paths are separated by ;



  • What can I say, You are the MAN

    When I find the next problem, I will for sure Write a comment here.

    Thank You soooooooooooooooo much.



  • Oops looks like I've got my next problem very fast,
    Here it is When I try to build the (Plug&paint Example) from the Qt creator Demos and Examples,
    I get errors Here is the compile output:

    17:59:40: Running build steps for project plugandpaint...
    17:59:40: Configuration unchanged, skipping qmake step.
    17:59:40: Starting: "C:\QtSDK\mingw\bin\mingw32-make.exe"
    C:/QtSDK/mingw/bin/mingw32-make.exe -f Makefile.Debug
    mingw32-make.exe[1]: Entering directory C:/QtSDK/Examples/4.7/tools/plugandpaint' g++ -mthreads -Wl,-subsystem,windows -o debug\plugandpaint.exe debug/main.o debug/mainwindow.o debug/paintarea.o debug/plugindialog.o debug/moc_mainwindow.o debug/moc_paintarea.o debug/moc_plugindialog.o -L"c:\QtSDK\Desktop\Qt\4.8.0\mingw\lib" -lmingw32 -lqtmaind -L/examples/tools/plugandpaint/plugins -lpnp_basictoolsd -lQtGuid4 -lQtCored4 mingw32-make.exe[1]: Leaving directoryC:/QtSDK/Examples/4.7/tools/plugandpaint'
    c:/qtsdk/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe: cannot find -lpnp_basictoolsd
    collect2: ld returned 1 exit status
    mingw32-make.exe[1]: *** [debug\plugandpaint.exe] Error 1
    mingw32-make.exe: *** [debug] Error 2
    17:59:41: The process "C:\QtSDK\mingw\bin\mingw32-make.exe" exited with code 2.
    Error while building project plugandpaint (target: Desktop)
    When executing build step 'Make'

    But, if you don't mind would you tell me How to know What is the errors.
    Thanks



  • I don't know why you get that error, but first you can try to build that libpnp_basictoolsd library

    And a little suggestion: please start a new discussion for each new problem, that way the problem becomes more visible both for people that post answers and for those that may search for answers later after the problem has been discussed.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.