Qmake project compiles with VS2010 but not with QtCreator



  • I am a Newbie to QtCreator - VS 2010 just sucks ;-) I thought getting started with an easy console application that I've recently written using vtk (not even Qt - sorry!). I created a qmake project for it, which compiles and links just fine when imported to VS2010.

    However, when I open the same project with QtCreator (using the MSVC build environment!) it does compile, but throws a lot of linker errors within vtk libraries. Anybody had this problem before? I don't know what to do :-(



  • Can you paste here a project file?



  • Sure! This is it:

    @TEMPLATE = app

    DESTDIR = bin

    INCLUDEPATH += $(VTKPATH)Views $(VTKPATH)Geovis $(VTKPATH)Utilities/vtkalglib $(VTKPATH)Infovis $(VTKPATH)Build/GUISupport/Qt/Chart $(VTKPATH)GUISupport/Qt/Chart $(VTKPATH)Build/GUISupport/Qt $(VTKPATH)GUISupport/Qt $(VTKPATH)Utilities/verdict $(VTKPATH)Build/Utilities/verdict $(VTKPATH)Utilities/MaterialLibrary $(VTKPATH)Build/Utilities/MaterialLibrary $(VTKPATH)Utilities/vtkexodus2/include $(VTKPATH)Build/Utilities/vtkexodus2/include $(VTKPATH)Utilities/vtknetcdf $(VTKPATH)Build/Utilities/vtknetcdf $(VTKPATH)Utilities/vtkfreetype/include $(VTKPATH)Build/Utilities/vtkfreetype/include $(VTKPATH)Utilities/DICOMParser $(VTKPATH)Build/Utilities/DICOMParser $(VTKPATH)Utilities/vtklibproj4 $(VTKPATH)Build/Utilities/vtklibproj4 $(VTKPATH)Common/Testing/Cxx $(VTKPATH)Utilities $(VTKPATH)Common $(VTKPATH)Filtering $(VTKPATH)GenericFiltering $(VTKPATH)Graphics $(VTKPATH)Imaging $(VTKPATH)IO $(VTKPATH)Rendering/Testing/Cxx $(VTKPATH)Rendering $(VTKPATH)Widgets $(VTKPATH)Hybrid $(VTKPATH)VolumeRendering $(VTKPATH)Parallel $(VTKPATH)Build/Utilities/vtkalglib $(VTKPATH)Build/Rendering $(VTKPATH)Build/VolumeRendering $(VTKPATH)Build/Utilities $(VTKPATH)Build/Common $(VTKPATH)Build

    LIBS += -L$(VTK_LIBS)Release
    LIBS += -lCosmo -lMapReduceMPI -lmpistubs -lQVTK -lVPIC -lvtkalglib -lvtkCharts -lvtkCommon -lvtkDICOMParser -lvtkexoIIc -lvtkexpat -lvtkFiltering -lvtkfreetype -lvtkftgl -lvtkGenericFiltering -lvtkGeovis -lvtkGraphics -lvtkhdf5 -lvtkHybrid -lvtkImaging -lvtkInfovis -lvtkIO -lvtkjpeg -lvtklibxml2 -lvtkmetaio -lvtkNetCDF -lvtkNetCDF_cxx -lvtkParallel -lvtkpng -lvtkproj4 -lvtkRendering -lvtksqlite -lvtksys -lvtktiff -lvtkverdict -lvtkViews -lvtkVolumeRendering -lvtkWidgets -lvtkzlib

    CONFIG += console release
    CONFIG -= qt

    SOURCES += main.cpp
    @



  • Add this to a project and check messages. I think that a VTK_LIBS is probably not set.
    @
    message($(VTKPATH))
    message($(VTK_LIBS))
    @



  • Both set. These are in my Windows system path. Opening the project file in Visual Studio works just fine, compiles and links with no errors. It's just within QtCreator that I encounter these linker errors.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.