Important: Please read the Qt Code of Conduct -

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:

    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?


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

    Thanks for any help.

  • You can use the dependency walker depends.exe. It is not provided by Microsoft anymore, but you can download it from its own "homepage":

    For some hints on the usage of depends.exe, see this "older thread":

  • 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.

  • 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.

    @- <Event>

    • <System>
      <Provider Name="SideBySide" />
      <EventID Qualifiers="49409">33</EventID>
      <TimeCreated SystemTime="2011-10-06T11:52:10.000000000Z" />
      <Security />
    • <EventData>
      <Data />
      <Data />
      <Data />
      <Data />
      <Data />
      <Data />
      <Data />
      <Data />
      <Data />
      <Data />
      <Data />
      <Data />
      <Data />
      <Data />
      <Data />
      <Data />
      <Data />
      <Data />

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

  • 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":, 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

  • Thank you, although maybe little late, for advice I finally compiled Qt. According this:
    It took me (on my laptop) more than 3 hours but it finally working.

  • Hi,

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

    I followed the link:

    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

  • Did you install the "vsaddin": ?
    You should try to setup a new Qt project.

  • [quote author="Volker" date="1317904320"]You must not use the VS2008 Qt binaries together with VS2010. Absolutely never.[/quote]

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

  • 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 :)

  • 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

Log in to reply