qt with vc++

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • saee
    New Member
    • Feb 2009
    • 24

    #1

    qt with vc++

    hi, i am trying qt with visual studio. hello world program.
    here are the errors.

    >Performing Makefile project actions
    1>'mingw32-make' is not recognized as an internal or external command,
    1>operable program or batch file.
    1>Project : error PRJ0002 : Error result 1 returned from 'C:\WINDOWS\Sys Wow64\cmd.exe'.
    1>Build log was saved at "file://c:\Documents and Settings\Admini strator\My Documents\Qt\he ll2\hell2\Debug \BuildLog.htm"
    1>hell2 - 1 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


    if i include C:\mingw\bin to include directories i get

    1>Performing Makefile project actions
    1>mingw32-make -f Makefile.Debug
    1>mingw32-make[1]: Entering directory `c:/Documents and Settings/Administrator/My Documents/Qt/hell2/hell2'
    1>mingw32-make[1]: Leaving directory `c:/Documents and Settings/Administrator/My Documents/Qt/hell2/hell2'
    1>Makefile.Debu g:58: *** missing separator. Stop.
    1>mingw32-make: *** [debug] Error 2
    1>Project : error PRJ0002 : Error result 2 returned from 'C:\WINDOWS\Sys Wow64\cmd.exe'.
    1>Build log was saved at "file://c:\Documents and Settings\Admini strator\My Documents\Qt\he ll2\hell2\Debug \BuildLog.htm"
    1>hell2 - 1 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    i removed mingw path because i read somewhere, use make msvc instead of wingw32 -make.
    it means use vc compiler instead of wingw. ryt? if so how to do it?
    i mean, what setting shall i change?
    please help.
    thanks in advance.
  • newb16
    Contributor
    • Jul 2008
    • 687

    #2
    If you try to build it with vc, why do you add *whatever* mingw stuff to *whatever* ? Why qmake generates makefile for mingw but not for vs - there is some addon (as in paid version) that allows it to generate makefile for vc.

    Comment

    • saee
      New Member
      • Feb 2009
      • 24

      #3
      when i installed qt it asked for mingw. so, i added bin files. but even if i don't add it it still gives error.
      i tried installing qt again. after 'configure', when i run nmake/make it says
      nmake is not recognized.

      Comment

      • Banfa
        Recognized Expert Expert
        • Feb 2006
        • 9067

        #4
        That is because MSVC does not automatically add its bin path to the environment PATH.

        Start a Command Prompt, locate the MSVC bin directory and run vsvars32.bat, then locate your make make file directory and try running nmake there again.

        This must all be done from the same command prompt.

        Comment

        • saee
          New Member
          • Feb 2009
          • 24

          #5
          hi banfa,
          i did it. now it gives error


          .\option.cpp(69 8) : fatal error C1083: Cannot open include file: 'windows.h': No
          such file or directory
          Generating Code...
          NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\
          VC\BIN\cl.EXE"' : return code '0x2'
          Stop.
          NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\
          VC\BIN\nmake.ex e"' : return code '0x2'
          Stop.

          where is windows.h suppose to be?

          Comment

          • newb16
            Contributor
            • Jul 2008
            • 687

            #6
            in platform sdk. duh

            Comment

            • saee
              New Member
              • Feb 2009
              • 24

              #7
              thanks guys.
              nmake runs successfully.
              this is final message.

              link /NOLOGO /INCREMENTAL:NO /SUBSYSTEM:conso le /OUT:..\bin\qmak e.exe @C
              :\DOCUME~1\ADMI NI~1\LOCALS~1\T emp\nm20.tmp

              alright??
              now i made a 'hello' project.
              set include directory.
              build errors:

              1>------ Build started: Project: hello, Configuration: Debug Win32 ------
              1>Performing Makefile project actions
              1>mingw32-make -f Makefile.Debug
              1>mingw32-make[1]: Entering directory `c:/Documents and Settings/Administrator/My Documents/Qt/hello/hello'
              1>mingw32-make[1]: Leaving directory `c:/Documents and Settings/Administrator/My Documents/Qt/hello/hello'
              1>Makefile.Debu g:58: *** missing separator. Stop.
              1>mingw32-make: *** [debug] Error 2
              1>Project : error PRJ0002 : Error result 2 returned from 'C:\WINDOWS\Sys Wow64\cmd.exe'.
              1>Build log was saved at "file://c:\Documents and Settings\Admini strator\My Documents\Qt\he llo\hello\Debug \BuildLog.htm"
              1>hello - 1 error(s), 0 warning(s)
              ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

              what is ***missing seperator?
              thanks...

              Comment

              • saee
                New Member
                • Feb 2009
                • 24

                #8
                hi,
                there are no .lib files in lib folder.
                now i need to build libraries. right??
                how to do that??

                Comment

                Working...