Sunday, July 6th 2008, 4:01pm UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

DMLP

Beginner

1

Sunday, March 23rd 2008, 9:38pm

Error compiling QT

Hey,

I'm compiling Qt in WinXP SP2. But I get the same error over and over again.
I did it in school, but at home it won't work :s. On both computers are MSVS2005 installed.
For Qt I use MinGW for compiling and Eclipse for writing.

this is the error I get:

Creating library file: c:\Qt\4.3.4\lib\libQtCored4.a
./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x836c): In function `Z8readLinkRK7QString':
C:/Qt/4.3.4/src/corelib/io/qfsfileengine_win.cpp:1333: undefined reference to `CoCreateInstance@20'
./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x838b):C:/Qt/4.3.4/src/corelib/io/qfsfileengine_wi
n.cpp:1333: undefined reference to `CoInitialize@4'
./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x83b9):C:/Qt/4.3.4/src/corelib/io/qfsfileengine_wi
n.cpp:1333: undefined reference to `CoCreateInstance@20'
./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x83e0):C:/Qt/4.3.4/src/corelib/io/qfsfileengine_wi
n.cpp:1333: undefined reference to `IID_IPersistFile'
./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x8574):C:/Qt/4.3.4/src/corelib/io/qfsfileengine_wi
n.cpp:1333: undefined reference to `CoUninitialize@0'
./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x85b5):C:/Qt/4.3.4/src/corelib/io/qfsfileengine_wi
n.cpp:1333: undefined reference to `CoCreateInstance@20'
./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x85d4):C:/Qt/4.3.4/src/corelib/io/qfsfileengine_wi
n.cpp:1333: undefined reference to `CoInitialize@4'
./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x8605):C:/Qt/4.3.4/src/corelib/io/qfsfileengine_wi
n.cpp:1333: undefined reference to `CoCreateInstance@20'
./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x862c):C:/Qt/4.3.4/src/corelib/io/qfsfileengine_wi
n.cpp:1333: undefined reference to `IID_IPersistFile'
./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x88fc):C:/Qt/4.3.4/src/corelib/io/qfsfileengine_wi
n.cpp:1333: undefined reference to `CoUninitialize@0'
./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x8a33): In function `ZN13QFSFileEngine4linkERK7QSt
ring':
C:/Qt/4.3.4/src/corelib/io/qfsfileengine_win.cpp:1427: undefined reference to `CoCreateInstance@20'
./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x8a52):C:/Qt/4.3.4/src/corelib/io/qfsfileengine_wi
n.cpp:1427: undefined reference to `CoInitialize@4'
./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x8a80):C:/Qt/4.3.4/src/corelib/io/qfsfileengine_wi
n.cpp:1427: undefined reference to `CoCreateInstance@20'
./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x8cdc):C:/Qt/4.3.4/src/corelib/io/qfsfileengine_wi
n.cpp:1427: undefined reference to `IID_IPersistFile'
./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x8d84):C:/Qt/4.3.4/src/corelib/io/qfsfileengine_wi
n.cpp:1427: undefined reference to `CoUninitialize@0'
./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x8e57):C:/Qt/4.3.4/src/corelib/io/qfsfileengine_wi
n.cpp:1427: undefined reference to `CoCreateInstance@20'
./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x8e76):C:/Qt/4.3.4/src/corelib/io/qfsfileengine_wi
n.cpp:1427: undefined reference to `CoInitialize@4'
./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x8ea4):C:/Qt/4.3.4/src/corelib/io/qfsfileengine_wi
n.cpp:1427: undefined reference to `CoCreateInstance@20'
./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x9426):C:/Qt/4.3.4/src/corelib/io/qfsfileengine_wi
n.cpp:1427: undefined reference to `IID_IPersistFile'
./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0x96e7):C:/Qt/4.3.4/src/corelib/io/qfsfileengine_wi
n.cpp:1427: undefined reference to `CoUninitialize@0'
./tmp\obj\debug_shared\quuid.o(.text+0x229b): In function `ZN5QUuid10createUuidEv':
C:/Qt/4.3.4/src/corelib/plugin/quuid.cpp:416: undefined reference to `CoCreateGuid@4'
./tmp\obj\debug_shared\qeventdispatcher_win.o(.text+0x2776): In function `ZN28QEventDispatcherWin32P
rivate16doWsaAsyncSelectEi':
C:/Qt/4.3.4/src/corelib/kernel/qeventdispatcher_win.cpp:395: 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.4/src/corelib'
mingw32-make[1]: *** [debug-all] Error 2
mingw32-make[1]: Leaving directory `C:/Qt/4.3.4/src/corelib'
mingw32-make: *** [sub-corelib-make_default-ordered] Error 2

can someone help me.

I've looked at the paths and libs, but there is nog sh.exe or other kinds of common problems found :s.

Thanks

This post has been edited 1 times, last edit by "DMLP" (Mar 25th 2008, 9:55pm)

  • Go to the top of the page

michaelM

Beginner

Posts: 2

Location: Stuttgart/Germany

Occupation: Professor Emeritus

2

Thursday, April 24th 2008, 2:00pm

RE: Error compiling QT

Hello,
I am fighting exactly the same problem. Checked all path settings etc.
Does anybody know the solution?

Need some help. Thanks
  • Go to the top of the page

macabre13

Trainee

Posts: 127

Location: Poland/ Wroclaw

Occupation: sw developer

3

Friday, April 25th 2008, 7:35am

Hi, please check that you have all PATHs and SETs properly set, or simply run >>>x:\qt\qtx.x.x\bin\qtvars.bat<<< and try to compile again.
- ebm - noise - industrial -
I always could be wrong.
Lets share knowledge!
  • Go to the top of the page

itachi86

Beginner

Posts: 25

Location: Paris

Occupation: studdent

4

Friday, April 25th 2008, 7:52am

Yeah I agree with macabre13.

Yuo have to check $PATH , $QTDIR and $QMAKESPEC variables ...
Dude : You have a banana in your ear!!!
John Doe : WHAT?!?
Dude : YOU HAVE A BANANA IN YOU EAR
John Doe : I CAN'T HEAR YOU I HAVE A BANANA IN MY EAR.
  • Go to the top of the page

michaelM

Beginner

Posts: 2

Location: Stuttgart/Germany

Occupation: Professor Emeritus

5

Friday, April 25th 2008, 11:21am

Hi guys, thanks for the advise.
Unfortunately that's not it. I had set PATH, QTDIR and QMAKESPEC correctly.

The problem seems to be that missing functions like 'CoCreateInstance' and the others (see error message) are not found. These special functions are supposedly embedded in the windows lib ole32.dll. There is a '-lole32' in the Makefile.Release and no complaint from make that this is not found.

On the other hand there is a libole32.a in the C:\mingw\lib folder.

Since I didn't dig deep into qmake etc. I don't know what to change and where where in order to direct the system to look for the c:\mingw\lib\libole32.a instead of the ole32.dll in the windows\system32 (or vice versa).

In the old days I would have just changed the makefile by hand, but these days everything is cryptically entangled. In fact there are many Makefiles, practically in every subfolder. There must be a general way to set links somewhere.

Maybe you guy's know what to do.

Thanks in advance.
  • Go to the top of the page

Rate this thread