Results 1 to 3 of 3

Thread: Cygwin not wanted (WinXP) how do I change compiler of chioce?

  1. #1
    Join Date
    Sep 2009
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Cygwin not wanted (WinXP) how do I change compiler of chioce?

    Hi all,

    This is only my second post.
    I have been trying to get Qt creator to work for me for a month. It have been one of my bigger frustrations. I am trying to learn C++ using a decent GUI editor and Qt seem to be perfect for it but for the complexity of installation. I am an amateur with a background in 'c' and have used RealBasic and VB6 in years past (shame shame).

    I have Microsoft Visual Studio 2008 installed and seem to recall that I should be able to use the compiler for it. Now, the qustion I have is: how do I change Qt configuration to use MSVS2008 over Cygwin? Is there an easy way to let Qt to read what I want in PATH? I suspect otherwise.

    This is what I have now when I compile a simple empty window:

    Configuration unchanged, skipping QMake step.
    Starting: c:\MinGW\bin\mingw32-make.exe
    c:/MinGW/bin/mingw32-make.exe -f Makefile.Debug
    mingw32-make.exe[1]: Entering directory `C:/Documents and Settings/Derek/Desktop/Qt/myQtTest01'
    c:/Qt/4.5.2/bin/uic.exe mainwindow.ui -o ui_mainwindow.h
    g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I'c:/Qt/4.5.2/include/QtCore' -I'c:/Qt/4.5.2/include/QtGui' -I'c:/Qt/4.5.2/include' -I'c:/Qt/4.5.2/include/ActiveQt' -I'debug' -I'.' -I'c:/Qt/4.5.2/mkspecs/win32-g++' -o debug/mainwindow.o mainwindow.cpp
    g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows -o debug/myQtTest01.exe debug/main.o debug/mainwindow.o debug/moc_mainwindow.o -L'c:/Qt/4.5.2/lib' -lmingw32 -lqtmaind -lQtGuid4 -lQtCored4
    mingw32-make.exe[1]: Leaving directory `C:/Documents and Settings/Derek/Desktop/Qt/myQtTest01'
    debug/moc_mainwindow.o(.rdata$_ZTV10MainWindow[vtable for MainWindow]+0xb0): In function `ZSt17__verify_groupingPKcjRKSs':
    /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/locale_facets.tcc:2509: undefined reference to `QWidget::x11Event(_XEvent*)'
    <== this is what I do not know how to change
    collect2: ld returned 1 exit status
    mingw32-make.exe[1]: *** [debug/myQtTest01.exe] Error 1
    c:\MinGW\bin\mingw32-make.exe : *** [debug] Error 2
    Exited with code 2.
    Error while building project myQtTest01
    When executing build step 'Make'
    Guru helped me find that my compilation problems were due to my Qt installation using Cygwin as compiler.


    PLEASE! ANYONE? I do not want Cygwin as compiler but this is what was defaulted when I ran install. What did I miss.

    Most gratelful to anyone with insite.
    regards
    x_

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Cygwin not wanted (WinXP) how do I change compiler of chioce?

    You could try:
    Qt Code:
    1. qmake -spec win32-msvc
    To copy to clipboard, switch view to plain text mode 
    To get a Makefile set for MS VC++. You will have to make sure the environment is suitable to build with MS VC++.

    Or, you could build your own Qt:
    Download and unpack the Qt Windows source
    Open a Visual C++ command prompt
    Change to source directory
    Follow the build instructions (probably just configure, nmake)
    Tell QtCreator to use the new Qt build.
    For consistency, you could build QtCreator with VC++.

    The resulting version of Qt should default to using Microsoft's C++.

    Now, back to maintaining my inherited VB6 application
    Last edited by ChrisW67; 30th September 2009 at 04:59.

  3. #3
    Join Date
    Sep 2009
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Cygwin not wanted (WinXP) how do I change compiler of chioce?

    ChrisW67

    Worked perfectly. I went back to finally read what Qt was and this makes perfect sense.

    The best of luck on the VB6 project. I hope never to see one again . Enjoy the Option Base and dll hell.

    Off to c what I can do with the creator.

    cheers and thanks again.
    x_

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.