[vtkusers] Qt with VTK error-MSVCP80.dll not found

Marc Cotran marc at cotran.ca
Thu Oct 12 00:17:15 EDT 2006


Ashish Singh wrote:
> Thanks Marc. Yes they are in my path.
> Can anyone give me steps in configuring VTK to use QT successfully?
Ok. I'll tell you what I did to install VTK and Qt, hopefully I will 
redeem myself with at least some of this:

QT:
--

It seems you already have Qt 4 working, but just in case...

- You must have Qt 4. The GPL version at http://qtwin.sourceforge.net 
compiles
  and works. (It is the only free version with a qmake executable which 
creates
  .dsp files.) (:pserver:anonymous at qtwin.cvs.sourceforge.net:/cvsroot/qtwin,
                module: qt-4, [[[[USE HEAD BRANCH]]]] branch/tag qt_4_0_0)
- You need to set 4 environment variables:

QTDIR - dir where qt-4 can be found (c:\cvshome\qt-4)
QMAKESPEC - compiler specific (c:/cvshome/qt-4/mkspecs/win32-msvc.net)
PATH += $(QTDIR)\bin
PATH += c:\cvshome\qt-4\bin

- Run the command "qconfigure msvc.net" from an *MSVC* command prompt in 
the qt-4 directory. [[[[ Then type "nmake" at the command prompt ]]]]
  This will generate the Qt code and build the necessary libraries.


VTK:
---

- You must build VTK from CVS. It needs Qt support (and so GUI support). 
At the
  time of writing this document (Sep 4, 2005), this is only attainable 
by using
  a CVS version of CMake. (:pserver:anonymous at www.cmake.org:/cvsroot/CMake,
                           module: CMake, password: cmake)
- Nowadays, you may get away with using the release version of CMake, 
I'm just not sure. If that works, skip the next part.
- Use the release version of CMake 
(http://www.cmake.org/HTML/Download.html) to configure  the CVS version 
of CMake. In the configuration, click on the show advanced values and 
specify the location of the qt include dir "c:/cvshome/qt-4/include". 
Then load the .sln in VS and build. Now you will have a CmakeSetup.exe 
ready in the bin/debug directory. So now you can configure VTK with the 
cutting edge CMake version.

- download VTK-5-0 from CVS:

 cvs -d :pserver:anonymous at public.kitware.com:/cvsroot/VTK login
module: VTK
branch: VTK-5-0
(respond with password vtk)

- Now you need to configure VTK with new version of CMake you just 
built. You can find it in "c:\cmakebin\bin\debug" - CMakeSetup.exe:

Run CMakeSetup.exe, type in the source dir and the target dir: source is 
"c:\cvshome\VTK" and target should be "c:\VTKBin" so that we are consistent

Configure for MSVC.net 7.0 (should work with other versions as well)

Now click on "Show Advanced Values" and choose:
    1) Build Shared Libs ON
    2) VTK Debug Leaks ON (your preference)
    3) GUI Support ON (no choice if you want to use Qt)
- You may need to tell CMake where to find qglobal.h (it is in 
corelib/global - beware of imitations)
  and qmake.exe, it should find the rest of the files by itself.
- Keep pressing Configure [select QVTK - *not* MFC] and OK until there 
is nothing left to do.
- CMake will generate a VTK.sln in the directory you put the VTK 
binaries. Build the solution.

You need to set an environment variable for the debug dll paths:

PATH += c:\VTKBin\bin\debug

hth

Marc



More information about the vtkusers mailing list