Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Problem in debugging qt program
Forum Updated to NodeBB v4.3 + New Features

Problem in debugging qt program

Scheduled Pinned Locked Moved General and Desktop
28 Posts 3 Posters 8.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    koahnig
    wrote on last edited by
    #19

    If you want to use Qt libs 4.8.4 (VS2010 Opensource) you must use the compiler tool chain shipped with msvc2010 for compilation.

    "According to this":http://de.wikipedia.org/wiki/Microsoft_Visual_Studio#Version_2010 it would be the second one you have tried.
    [quote author="Amirhosein" date="1376313350"]
    C:\Program Files\Microsoft Visual Studio 10.0\VC>nmake

    Microsoft (R) Program Maintenance Utility, Version 10.00.30319.01
    Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

    NMAKE : fatal error U1064: MAKEFILE nicht gefunden und kein Ziel angegeben
    Stop.
    [/quote]
    This seems to be correct nmake, but the makefile is missing.

    Do you use msvc2010 as IDE (integrated development environment) or Qt creator?

    I got the feeling that you are working on command prompt only. Is that true?

    Anyway a qmake run is missing. This would create the missing makefile.

    Vote the answer(s) that helped you to solve your issue(s)

    1 Reply Last reply
    0
    • A Offline
      A Offline
      Amirhosein
      wrote on last edited by
      #20

      I don't have Qt creator, so I only use command prompt.

      so you think that my Qt has a problem?

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #21

        No, what koahnig said is that you probably didn't run qmake, so you don't don't have a Makefile because of that.

        To build your project (and I recommend a shadow build)

        make a shadow build folder besides your source folder

        cd into that folder

        call qmake ..\mycoolprogram\mycoolprogram.pro

        call nmake

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • A Offline
          A Offline
          Amirhosein
          wrote on last edited by
          #22

          of course I built my project with qmake, but I got an error that I posted before,
          I think I should try the new versions of Qt which has also Qt creator but does Qt5,1 that released recently work with MSVC 2010 or I should also install the later version of VC?

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #23

            What do you have in the folder where you ran qmake ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • A Offline
              A Offline
              Amirhosein
              wrote on last edited by
              #24

              Hello.cpp
              Hello.pro
              Makefile
              Makefile.debug
              Makefile.release
              release and debug folder which are emoty.

              1 Reply Last reply
              0
              • K Offline
                K Offline
                koahnig
                wrote on last edited by
                #25

                [quote author="Amirhosein" date="1376316291"]of course I built my project with qmake, but I got an error that I posted before,
                I think I should try the new versions of Qt which has also Qt creator but does Qt5,1 that released recently work with MSVC 2010 or I should also install the later version of VC?[/quote]
                Sorry, for criss-crossing with SGaist. Certainly, he is correct that you should be able to do all from command prompt. If you think that is the better way, that is fine.

                However, I think using an IDE helps to get all required steps in the right order.

                If you have a fully licensed MSVC2010 version (not the express version which is for free), you can install vsaddin or maybe you have that should take care of calling qmake and nmake in the right sequence.

                An alternative is using Qt creator and your "only" choice when you have only an msvc express version.

                You do not have to switch to Qt 5 for using Qt creator. You install from the download page the Qt5 SDK which includes Qt creator. This will allow you also to continue to use Qt4.8.4 libs as already installed. However, you "waste" a bit of HD space, but have already Qt5 too.
                Alternatively, you can install "Qt creator":http://download.qt-project.org/official_releases/qtcreator/2.8/2.8.0/qt-creator-windows-opensource-2.8.0.exe separately from download page.

                Vote the answer(s) that helped you to solve your issue(s)

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  Amirhosein
                  wrote on last edited by
                  #26

                  I have Visual Studio professional and also Qt4 visual studio Add-in. But when I write Qt program in visual studio It gives me this error:"C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB6006: "cmd.exe" wurde mit dem Code 1 beendet." which means: "cmd.exe exited with code 1"
                  I searched for the solution for this error but I couldn't find any useful solution, I think it has a problem with Qmake.

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    koahnig
                    wrote on last edited by
                    #27

                    Do you have no problems with a simple hello world program without Qt?

                    Make sure that msvc is properly setup. When this is the case, I would recommend to install Qt libs and the newest vsaddin freshly.

                    Vote the answer(s) that helped you to solve your issue(s)

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      Amirhosein
                      wrote on last edited by
                      #28

                      I frequently write programs with MSVC and I don't have any problem but when I want to write Qt program, I have the problem.

                      I wanted to try another solutions than installing other versions because I need several permissions to install a program on my pc, but I will try to install the new versions of Qt and MSVC.

                      anyway, thanks for your help. :-)

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved