error configuring Qt for Visual studio

This is a discussion on error configuring Qt for Visual studio within the C++ Programming forums, part of the General Programming Boards category; I have just installed the Qt graphics library and then typed configure -platform win32-msvc2008 in Visual Studio 2008 command prompt ...

  1. #1
    Registered User
    Join Date
    Aug 2009
    Posts
    28

    error configuring Qt for Visual studio

    I have just installed the Qt graphics library and then typed configure -platform win32-msvc2008 in Visual Studio 2008 command prompt in order to configure it for the particular IDE. However, because of spaces in path of the latter, the operation fails. In other words, space characters in Visual Studio's path act as delimiters making command shell read it as multiple parameters. How to solve this issue?

  2. #2
    Registered User
    Join Date
    Oct 2006
    Location
    Canada
    Posts
    1,243
    i dont see spaces in your argument's value. in general, if your using the command line and have a value with a space, you surround it by double quotes, i.e:
    Code:
    configure -platform my platform
    would be
    configure -platform "my platform"
    note: for this to work properly, the program your calling must be written to handle it.

  3. #3
    Registered User
    Join Date
    Aug 2009
    Posts
    28
    Visual Studio command prompt starts with the line "C:\Program Files\Microsoft Visual Studio 9.0\VC>", which later gets retyped for some reason. This is where spaces are contained. Consequently, it will keep returning the errors:

    Code:
    cl : Command line warning D9027 : source file '9.0\VC\include' ignored
    cl : Command line warning D9024 : unrecognized source file type 'Files\Microsoft
    ', object file assumed
    cl : Command line warning D9027 : source file 'Files\Microsoft' ignored
    cl : Command line warning D9024 : unrecognized source file type 'Visual', object
     file assumed
    cl : Command line warning D9027 : source file 'Visual' ignored
    cl : Command line warning D9024 : unrecognized source file type 'Studio', object
     file assumed
    cl : Command line warning D9027 : source file 'Studio' ignored
    cl : Command line warning D9024 : unrecognized source file type '9.0\VC\include\
    QtCore', object file assumed

  4. #4
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,248
    The configure script is stupid and broken. Please, please complain to the Qt folks. Having spaces in the path is legitimate (even on UNIX systems) and should not cause the configure script to fail.

    The workaround is truly awful: Install Visual Studio in a custom location which has no spaces in the path.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  5. #5
    Registered User
    Join Date
    Aug 2009
    Posts
    28
    Quote Originally Posted by brewbuck View Post
    The configure script is stupid and broken. Please, please complain to the Qt folks. Having spaces in the path is legitimate (even on UNIX systems) and should not cause the configure script to fail.

    The workaround is truly awful: Install Visual Studio in a custom location which has no spaces in the path.
    You are right, I was just looking for a simpler solution. I have already started a topic at qtcentre.org without any luck. At last I will turn to the last resort, since Qt libraries are superior.

  6. #6
    Registered User
    Join Date
    Sep 2009
    Posts
    63
    I don't recall having any trouble building Qt with MSVC express a few weeks ago. The configure and build script just worked right out of the box. I only have the 2010 beta of Visual Studio, so let me see if I can build Qt with that.

  7. #7
    Registered User
    Join Date
    Sep 2009
    Posts
    63
    Apologies for the double post, but I've successfully built the core Qt libraries using Visual Studio 2010 installed in the default path. This is how I configured it:

    configure -platform win32-msvc2008 -debug-and-release (this last part may not be a requirement if you only want the release or debug libraries/DLLs)

    I ran this command using the VS command prompt to ensure that all the various things were added to my path.

    It built up to WebKit before it failed because of a "tr1 not fully supported" error. That last part is odd, considering that VS 2010 is supposed to implement more, not less, of the new C++0x stuff. In any case, it built the basic core and gui libs/DLLs.

  8. #8
    Registered User
    Join Date
    Aug 2009
    Posts
    28
    Appears like happening only to me. What would you advise me to do?

  9. #9
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    I have also configured and compiled Qt with Visual Studio (2005 in my case) sitting in the default path, which contains lots of spaces. That was Qt 4.5.1. I don't remember doing anything special.

    Try extracting Qt to a clean directory and simply try again.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  10. #10
    Registered User
    Join Date
    Aug 2009
    Posts
    28
    You probably mean installing Visual Studio to a clean directory because this is the case.

  11. #11
    3735928559
    Join Date
    Mar 2008
    Location
    RTP
    Posts
    839
    i successfully compiled qt from source and used the qt VS addin. that went pretty smoothly, but ironically, i couldn't get their installer to work.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. LDAP Query
    By Travoiz in forum C++ Programming
    Replies: 0
    Last Post: 08-13-2009, 02:58 PM
  2. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 04:45 PM
  3. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  4. load gif into program
    By willc0de4food in forum Windows Programming
    Replies: 14
    Last Post: 01-11-2006, 09:43 AM
  5. Learning OpenGL
    By HQSneaker in forum C++ Programming
    Replies: 7
    Last Post: 08-06-2004, 08:57 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21