Results 1 to 8 of 8

Thread: Windows XP compile error 4.3.1

  1. #1
    Join Date
    Jan 2006
    Posts
    75
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Windows XP compile error 4.3.1

    This is when I try to compile the debug libraries.

    I'm getting the following compile error:

    g++ -c -include tmp\obj\debug_shared\qt_pch.h -g -Wall -frtti -fexceptions -mthr
    eads -DQT_SHARED -DQT_THREAD_SUPPORT -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_BUILD
    _CORE_LIB -DQT_MAKEDLL -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -D
    _USE_MATH_DEFINES -DQT_DLL -I"..\..\include" -I"..\..\include\QtCore" -I"tmp" -I
    "global" -I"..\3rdparty\zlib" -I"..\..\include\ActiveQt" -I"tmp\moc\debug_shared
    " -I"." -I"..\..\mkspecs\win32-g++" -o tmp\obj\debug_shared\moc_qtextcodecplugin
    .o tmp\moc\debug_shared\moc_qtextcodecplugin.cpp
    g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel
    oc -mthreads -Wl -shared -Wl,--out-implib,c:\Qt\4.3.1\lib\libQtCored4.a -o "..\.
    .\lib\QtCored4.dll" object_script.QtCored.Debug -L"c:\Qt\4.3.1\lib" -L"c:\Progr
    am Files\SQLXML 4.0\bin\" -L"c:\Qt\4.3.1\lib" -lkernel32 -luser32 -lshell32 -luu
    id -lole32 -ladvapi32 -lws2_32 tmp\obj\debug_shared\QtCored_resource_res.o
    Creating library file: c:\Qt\4.3.1\lib\libQtCored4.a
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x8 358): In function `Z8readLin
    kRK7QString':
    C:/Qt/4.3.1/src/corelib/io/qfsfileengine_win.cpp:1310: undefined reference to `C
    oCreateInstance@20'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x8 377):C:/Qt/4.3.1/src/corelib
    /io/qfsfileengine_win.cpp:1310: undefined reference to `CoInitialize@4'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x8 3a5):C:/Qt/4.3.1/src/corelib
    /io/qfsfileengine_win.cpp:1310: undefined reference to `CoCreateInstance@20'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x8 3cc):C:/Qt/4.3.1/src/corelib
    /io/qfsfileengine_win.cpp:1310: undefined reference to `IID_IPersistFile'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x8 560):C:/Qt/4.3.1/src/corelib
    /io/qfsfileengine_win.cpp:1310: undefined reference to `CoUninitialize@0'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x8 5a1):C:/Qt/4.3.1/src/corelib
    /io/qfsfileengine_win.cpp:1310: undefined reference to `CoCreateInstance@20'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x8 5c0):C:/Qt/4.3.1/src/corelib
    /io/qfsfileengine_win.cpp:1310: undefined reference to `CoInitialize@4'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x8 5f1):C:/Qt/4.3.1/src/corelib
    /io/qfsfileengine_win.cpp:1310: undefined reference to `CoCreateInstance@20'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x8 618):C:/Qt/4.3.1/src/corelib
    /io/qfsfileengine_win.cpp:1310: undefined reference to `IID_IPersistFile'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x8 8e8):C:/Qt/4.3.1/src/corelib
    /io/qfsfileengine_win.cpp:1310: undefined reference to `CoUninitialize@0'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x8 a1f): In function `ZN13QFSFi
    leEngine4linkERK7QString':
    C:/Qt/4.3.1/src/corelib/io/qfsfileengine_win.cpp:1404: undefined reference to `C
    oCreateInstance@20'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x8 a3e):C:/Qt/4.3.1/src/corelib
    /io/qfsfileengine_win.cpp:1404: undefined reference to `CoInitialize@4'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x8 a6c):C:/Qt/4.3.1/src/corelib
    /io/qfsfileengine_win.cpp:1404: undefined reference to `CoCreateInstance@20'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x8 cc8):C:/Qt/4.3.1/src/corelib
    /io/qfsfileengine_win.cpp:1404: undefined reference to `IID_IPersistFile'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x8 d70):C:/Qt/4.3.1/src/corelib
    /io/qfsfileengine_win.cpp:1404: undefined reference to `CoUninitialize@0'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x8 e43):C:/Qt/4.3.1/src/corelib
    /io/qfsfileengine_win.cpp:1404: undefined reference to `CoCreateInstance@20'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x8 e62):C:/Qt/4.3.1/src/corelib
    /io/qfsfileengine_win.cpp:1404: undefined reference to `CoInitialize@4'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x8 e90):C:/Qt/4.3.1/src/corelib
    /io/qfsfileengine_win.cpp:1404: undefined reference to `CoCreateInstance@20'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x9 412):C:/Qt/4.3.1/src/corelib
    /io/qfsfileengine_win.cpp:1404: undefined reference to `IID_IPersistFile'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x9 6d3):C:/Qt/4.3.1/src/corelib
    /io/qfsfileengine_win.cpp:1404: undefined reference to `CoUninitialize@0'
    ./tmp\obj\debug_shared\quuid.o(.text+0x229b): In function `ZN5QUuid10createUuidE
    v':
    C:/Qt/4.3.1/src/corelib/plugin/quuid.cpp:411: undefined reference to `CoCreateGu
    id@4'
    ./tmp\obj\debug_shared\qeventdispatcher_win.o(.text+ 0x2776): In function `ZN28QE
    ventDispatcherWin32Private16doWsaAsyncSelectEi':
    C:/Qt/4.3.1/src/corelib/kernel/qeventdispatcher_win.cpp:390: undefined reference
    to `WSAAsyncSelect@16'
    collect2: ld returned 1 exit status
    mingw32-make[2]: *** [..\..\lib\QtCored4.dll] Error 1
    mingw32-make[2]: Leaving directory `C:/Qt/4.3.1/src/corelib'
    mingw32-make[1]: *** [debug] Error 2
    mingw32-make[1]: Leaving directory `C:/Qt/4.3.1/src/corelib'
    mingw32-make: *** [debug-C__Qt_4_3_1_src_corelib] Error 2
    C:\Qt\4.3.1\src>
    Any ideas? The code itself look exactly the same compared to the old 4.2 version I had installed.
    Last edited by kroenecker; 19th September 2007 at 22:48. Reason: updated contents

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Windows XP compile error 4.3.1

    You have to add ole32.lib to the dependencies list. That's where the function is defined.

  3. #3
    Join Date
    Jan 2006
    Posts
    75
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Windows XP compile error 4.3.1

    I am at a bit of a loss. I'm simply trying to compile the debug libraries using the console provided. I've never had to edit anything at that level before. When I look at the makefile in the corelib directory it looks like it is including ole32 to me.

    4.2.x compiles just fine. I have no idea what is going on.

    Is there anything else I can include that would be helpful?

  4. #4
    Join Date
    Jan 2006
    Posts
    75
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Windows XP compile error 4.3.1

    I can't seem to figure out what is missing. Any ideas?

  5. #5
    Join Date
    Jan 2006
    Posts
    75
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Windows XP compile error 4.3.1

    One of my environmental variables, lib, was set. I went ahead and deleted it. Now everything looks to be compiling just fine.

  6. #6
    Join Date
    Jan 2006
    Posts
    75
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Windows XP compile error 4.3.1

    I'm having a pretty rough time with compiling the debug files.

    Now I'm having the following problem:

    g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel
    oc -Wl,-s -Wl,-subsystem,console -mthreads -Wl -o "..\..\..\bin\uic3.exe" object
    _script.uic3.Release -L"c:\Qt\4.3.2\lib" -L"c:\Qt\4.3.2\lib" -lQt3Support4 -lQt
    Xml4 -lQtGui4 -lQtCore4
    C:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\ mingw32\bin\ld.exe: cannot fin
    d -lQt3Support4
    collect2: ld returned 1 exit status
    mingw32-make[2]: *** [..\..\..\bin\uic3.exe] Error 1
    mingw32-make[2]: Leaving directory `C:/Qt/4.3.2/src/tools/uic3'
    mingw32-make[1]: *** [release] Error 2
    mingw32-make[1]: Leaving directory `C:/Qt/4.3.2/src/tools/uic3'
    mingw32-make: *** [debug-C__Qt_4_3_2_src_tools_uic3] Error 2
    C:\Qt\4.3.2\src>

    I'm not sure what I need to do. Suggestions are much appreciated.

  7. #7
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Windows XP compile error 4.3.1

    When you configured Qt, you didn't enable Qt 3 support.
    Enabling should build the Qt 3 support libs and solve your problem.

  8. The following user says thank you to marcel for this useful post:

    kroenecker (15th October 2007)

  9. #8
    Join Date
    Jan 2006
    Posts
    75
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Windows XP compile error 4.3.1

    Thanks Marcel.

Similar Threads

  1. converting unix exe to windows binary
    By deekayt in forum General Programming
    Replies: 2
    Last Post: 17th September 2006, 02:00
  2. Project won't compile under Windows (works under Linux)
    By philski in forum Qt Programming
    Replies: 7
    Last Post: 14th September 2006, 16:29
  3. how to corss compile for windows in Linux
    By safknw in forum Qt Programming
    Replies: 24
    Last Post: 13th May 2006, 06:23
  4. Recompiling on Windows with BCC -- help
    By jamadagni in forum General Discussion
    Replies: 3
    Last Post: 30th January 2006, 16:47
  5. Replies: 4
    Last Post: 12th January 2006, 05:16

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.