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. How to compile Qt App using "Debug" in Visual Studio 2005 [Solved]

How to compile Qt App using "Debug" in Visual Studio 2005 [Solved]

Scheduled Pinned Locked Moved General and Desktop
14 Posts 4 Posters 6.6k Views
  • 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.
  • D Offline
    D Offline
    dbzhang800
    wrote on last edited by
    #2

    Hi,

    Which version of Qt are you using now? Does this version compiled by MSVC2005 or not?

    1 Reply Last reply
    0
    • Q Offline
      Q Offline
      Qnoobish
      wrote on last edited by
      #3

      I installed this:

      qt-win-opensource-4.8.2-vs2008.exe
      qt-vs-addin-1.1.11-opensource.exe

      My small application compiled successfully using the Release option in VS2005 but when I try to use Debug it throws me the error mentioned. Any hints?

      thanks for your reply.

      In short, software is eating the world.

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

        welcome to devnet

        You cannot use the sources compiled for vs2008 with vs2005. The binaries are not compatible. AFAIK it should not work in release mode either.

        Either you are getting a newer version vc or you need to compile Qt with vc 2005. There is a "wiki":http://qt-project.org/wiki/Building_Qt_Desktop_for_Windows_with_MSVC available. It refers to the most recent visual studio, but should work also for the older versions. Make sure to use for settings the ones for vs2005.

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

        1 Reply Last reply
        0
        • Q Offline
          Q Offline
          Qnoobish
          wrote on last edited by
          #5

          OK I think I understood.

          I can't upgrade to a newer VS, so I will try to compile Qt with VS2005.

          I'll keep posting my results.

          Thanks a lot :)

          In short, software is eating the world.

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

            The common problem is with nmake. Make sure to open the command prompt through vs. Otherwise nmake and possibly other environment settings will not be found. Be prepared that configure takes some time and also the compilation itself. One needs a bit of patience.

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

            1 Reply Last reply
            0
            • Q Offline
              Q Offline
              Qnoobish
              wrote on last edited by
              #7

              So I downloaded Qt Source Code and run "configuration", using Visual Studio 2005 Command prompt.

              And as a recommendation for new guys like me, dont label your folders with "spaces".

              E.g I labeled my directories...
              C:\Qt\source code\qt <--- didn't work
              C:\Qt\sourcecode\qt <--- works

              After the configuration stuff I ran "nmake" in the same command prompt window

              And it surely takes a while (as in It still hasn't finished after almost 2 hours)

              Well I'm going to wait & see what more results I can get about this topic.

              In short, software is eating the world.

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

                [quote author="Qnoobish" date="1345066780"]
                And as a recommendation for new guys like me, dont label your folders with "spaces".
                [/quote]

                That is an interesting remark. Seem to be valid for some of the folders but not in general.

                Would be good if you report differences, if any, to the procedure in the wiki.

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

                1 Reply Last reply
                0
                • P Offline
                  P Offline
                  pivonroll
                  wrote on last edited by
                  #9

                  I have that "spaces" problem all the time with Qt and vs 2005. Just use _ instead and you will be fine.

                  1 Reply Last reply
                  0
                  • Q Offline
                    Q Offline
                    Qnoobish
                    wrote on last edited by
                    #10

                    So aparently right now it looks like nmake finished doing it's stuff.
                    I would expect a "Everything OK" message at the end so I am not sure if nmake succeded.

                    Nevertheless in my VS project I added the generated library and try to buidl with debug. And it build & linked successfully but when I try to run it throws me an error window that says.

                    "The application failed to initialize properly (0xc0150002). Click on OK to terminante the application."

                    Hopefully someone has any comment regarding this :O

                    Thanks

                    In short, software is eating the world.

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

                      Did nmake stop with an error message?
                      Typically you will see a couple (actually a bucket full) of warnings. However the lines would indicate an error if something happened. During my last recompilation on one machine I could simply restart the nmake and eventually it finished without error.

                      Probably you should get all other versions of Qt out of your way to make sure that you are using the version you expect. Especially you can get rid of the vs2008 binaries as you downloaded. As long as you are not changing to newer version of vs there is no use.

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

                      1 Reply Last reply
                      0
                      • Q Offline
                        Q Offline
                        Qnoobish
                        wrote on last edited by
                        #12

                        nmake stopped without errors.

                        And after your mention I uninstalled Qt libraries binaries for VS2008.
                        And in the VS Qt Addin I added the correct version I am using.
                        First I added the path under Qt options and then chose the correct version under Qt project settings. This solved my last error when I tried to run my application :)
                        So now I can build and run using Debug and Release in Visual Studio 2005.

                        So I think everything is in order, I believe.

                        Thanks to everyone that shared their ideas and comments they were all very helpful.

                        In short, software is eating the world.

                        1 Reply Last reply
                        0
                        • Q Offline
                          Q Offline
                          Qnoobish
                          wrote on last edited by
                          #13

                          [quote author="koahnig" date="1345102133"][quote author="Qnoobish" date="1345066780"] And as a recommendation for new guys like me, dont label your folders with "spaces". [/quote] That is an interesting remark. Seem to be valid for some of the folders but not in general. Would be good if you report differences, if any, to the procedure in the wiki. [/quote]

                          About this I try to give it a look :), thanks.

                          In short, software is eating the world.

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

                            Good to know that this has been the problem.
                            When your problem has been solved, please mark the thread with [Solved] in the title. This shall help others to find solutions.

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

                            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