October 5, 2011

Grybb Grybb
Lab Rat
28 posts

I cannot run program compile in MS Visual studio 2010 with QT 4.7.4 (W7)

 

Hi,
I’m using W7 home, MS Visual studio 2010 Professional. This is first time when I’m trying QT. If I compile program, it is successful but I cannot run it. It giving me an error message:
error

I tried to copy some *.dll into directory with program but it didn’t help.

I was searching for some advice but it wasn’t successful. I found some advice about problem with compiling under MS VS 2010 with QT but it isn’t my problem… and I also found some about *.dll so I tried copy dll into program’s directory but I don’t know if there is the problem. Is there some way to know which libraries any program use?

So, do somebody know where is the problem?

dlls:

  1. 18.03.2010  09:15           421˙200 msvcp100.dll
  2. 18.03.2010  09:15           770˙384 msvcr100.dll
  3. 23.08.2011  14:41           266˙752 phonon4.dll
  4. 23.08.2011  14:40           509˙440 phonond4.dll
  5. 23.08.2011  14:34         2˙318˙848 Qt3Support4.dll
  6. 23.08.2011  14:33         3˙814˙400 Qt3Supportd4.dll
  7. 23.08.2011  16:18           894˙976 QtCLucene4.dll
  8. 23.08.2011  16:15         2˙336˙768 QtCLucened4.dll
  9. 01.10.2011  20:05         2˙293˙760 QtCore4.dll
  10. 01.10.2011  20:05         4˙130˙304 QtCored4.dll
  11. 23.08.2011  15:03         2˙426˙368 QtDeclarative4.dll
  12. 23.08.2011  15:00         4˙706˙304 QtDeclaratived4.dll
  13. 23.08.2011  16:26         4˙655˙104 QtDesigner4.dll
  14. 23.08.2011  16:28         1˙867˙264 QtDesignerComponents4.dll
  15. 23.08.2011  16:27         3˙815˙424 QtDesignerComponentsd4.dll
  16. 23.08.2011  16:25         8˙305˙152 QtDesignerd4.dll
  17. 23.08.2011  14:32         8˙223˙744 QtGui4.dll
  18. 23.08.2011  14:26        14˙445˙056 QtGuid4.dll
  19. 23.08.2011  16:20           428˙544 QtHelp4.dll
  20. 23.08.2011  16:19           828˙416 QtHelpd4.dll
  21. 23.08.2011  14:41           113˙152 QtMultimedia4.dll
  22. 23.08.2011  14:41           227˙840 QtMultimediad4.dll
  23. 23.08.2011  14:21           975˙360 QtNetwork4.dll
  24. 23.08.2011  14:21         1˙648˙640 QtNetworkd4.dll
  25. 23.08.2011  14:37           699˙392 QtOpenGL4.dll
  26. 23.08.2011  14:36         1˙291˙776 QtOpenGLd4.dll
  27. 23.08.2011  14:58         1˙294˙336 QtScript4.dll
  28. 23.08.2011  14:47         2˙661˙888 QtScriptd4.dll
  29. 23.08.2011  16:07           579˙072 QtScriptTools4.dll
  30. 23.08.2011  16:06         1˙034˙240 QtScriptToolsd4.dll
  31. 23.08.2011  14:21           191˙488 QtSql4.dll
  32. 23.08.2011  14:21           334˙848 QtSqld4.dll
  33. 23.08.2011  14:42           276˙480 QtSvg4.dll
  34. 23.08.2011  14:42           523˙264 QtSvgd4.dll
  35. 23.08.2011  14:22           102˙912 QtTest4.dll
  36. 23.08.2011  14:21           189˙952 QtTestd4.dll
  37. 23.08.2011  16:04        10˙837˙504 QtWebKit4.dll
  38. 23.08.2011  15:37        21˙757˙952 QtWebKitd4.dll
  39. 23.08.2011  14:20           339˙968 QtXml4.dll
  40. 23.08.2011  14:20           601˙600 QtXmld4.dll
  41. 23.08.2011  14:40         2˙550˙272 QtXmlPatterns4.dll
  42. 23.08.2011  14:38         5˙926˙400 QtXmlPatternsd4.dll

Thanks for any help.

10 replies

October 5, 2011

Volker Volker
Ant Farmer
5428 posts

You can use the dependency walker depends.exe. It is not provided by Microsoft anymore, but you can download it from its own homepage [dependencywalker.com].

PS:
For some hints on the usage of depends.exe, see this older thread [developer.qt.nokia.com]

October 6, 2011

Gerolf Gerolf
Robot Herder
3235 posts

Did you compile Qt from scratch (so from the zip file) or are you using a precompiled version?
The pre compiled version is AFAIK not compiled for MSVS 2010.

 Signature 

Nokia Certified Qt Specialist.
Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

October 6, 2011

Grybb Grybb
Lab Rat
28 posts

Thank you for answer. I Tried Dependency Walker, is seems like useful program, but it don’t help. I really didn’t have some dlls files, but when download these it doesn’t help. So error is somewhere else. Down is event log (Something is in Czech, but I thing it isn’t important.).

I do use precompiled version for VS 2008. Are you sure this is the reason for the error? I’ve read somewhere that version for VS 2008 is ok for 2010. I’ve wanted to avoid compile my own version because I’m beginner with VS and also with programming in general. But I probably found some tip how to do it and try to compile it.

  1. - <Event>
  2. - <System>
  3.   <Provider Name="SideBySide" />
  4.   <EventID Qualifiers="49409">33</EventID>
  5.   <Level>2</Level>
  6.   <Task>0</Task>
  7.   <Keywords>0x80000000000000</Keywords>
  8.   <TimeCreated SystemTime="2011-10-06T11:52:10.000000000Z" />
  9.   <EventRecordID>12076</EventRecordID>
  10.   <Channel>Application</Channel>
  11.   <Computer>NTB</Computer>
  12.   <Security />
  13.   </System>
  14. - <EventData>
  15.   <Data>Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken
  16. ="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"</Data>
  17.   <Data />
  18.   <Data />
  19.   <Data />
  20.   <Data />
  21.   <Data />
  22.   <Data />
  23.   <Data />
  24.   <Data />
  25.   <Data />
  26.   <Data>d:\dokumenty\programovani\qt\test2\QTGUID4.DLL</Data>
  27.   <Data />
  28.   <Data />
  29.   <Data />
  30.   <Data />
  31.   <Data />
  32.   <Data />
  33.   <Data />
  34.   <Data />
  35.   <Data />
  36.   </EventData>
  37.   </Event>

  1. Generování kontextu aktivace pro d:\dokumenty\programovani
  2. \qt\test2\QTGUID4.DLL se nezdařilo. Závislé sestavení
  3.  Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken
  4. ="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8" nelze najít.
  5.  Podrobnější diagnostické údaje získáte pomocí programu sxstrace.exe.

October 6, 2011

Volker Volker
Ant Farmer
5428 posts

You must not use the VS2008 Qt binaries together with VS2010. Absolutely never.

As there are nor prebuilt binaries for VS 2010, you will have to build Qt manually:

  • Get the sources from the Qt download page [qt.nokia.com], do not use the sources included in the binary download for VS 2008!
  • extract the zip
  • call configure.exe
  • run nmake
  • point your project to use the newly created Qt

October 22, 2011

Grybb Grybb
Lab Rat
28 posts

Thank you, although maybe little late, for advice I finally compiled Qt. According this: http://doc.qt.nokia.com/4.7/install-win.html
It took me (on my laptop) more than 3 hours but it finally working.

October 27, 2011

bluerose bluerose
Lab Rat
1 posts

Hi,

I’m also trying to get QT to work with MS Visual studio 2010 professional.

I followed the link: http://doc.qt.nokia.com/4.7/install-win.html

I was able to compile and nmake the QT. When I launch the MS visual studio IDE, and tried to use QT I get the following error, it seems it cannot recognize QT. I added QT/bin to my environment variable path.

So I don’t know the problem?

compiling error:

fatal error C1083: Cannot open include file: ‘QPoint’: No such file or directory

fatal error C1083: Cannot open include file: ‘QMainWindow’: No such file or directory

fatal error C1083: Cannot open include file: ‘QString’: No such file or directory

October 27, 2011

koahnig koahnig
Area 51 Engineer
2874 posts

Did you install the vsaddin [qt.nokia.com] ?
You should try to setup a new Qt project.

October 28, 2011

steno steno
Hobby Entomologist
233 posts
Volker wrote:
You must not use the VS2008 Qt binaries together with VS2010. Absolutely never.

I have been doing it ever since VS2010 was released and never come across any problems. Is it really that bad?

October 28, 2011

Volker Volker
Ant Farmer
5428 posts

Yes, it is. You will most likely run into troubles with memory management and other strange errors. From what I’ve heard, it could be possible to mix code compiled by two VS versions, but you really must know the internals of VS etc. to be aware of the implications. It’s usually not worth the effort unless you cry for strange errors :)

February 23, 2012

InfiniteRand InfiniteRand
Lab Rat
1 posts

For Qt 4.8 there is a VS 2010 pre-compiled binary it seems (haven’t tried it yet), for 4.7 only VS 2008 is available http://qt.nokia.com/downloads/downloads#qt-lib

 
  ‹‹ Can’t setup Qt Components 1.1 on my desktop environment      How to install plugin qmlcanvas? ››

You must log in to post a reply. Not a member yet? Register here!