[vtkusers] Problems when compiling simple program in Qt Creator

Andrea Caloni andreacaloni at hotmail.com
Mon Aug 12 06:12:00 EDT 2013


Hello,
in the .pro file, are the various 'libvtk***.a' added in the correct order ?
I mean, are you sure the order in which you added your 'LIBS += ...' to the .pro file is correct ?
I was not able to find out which is the correct order...

Andrea

 
Date: Sat, 10 Aug 2013 01:28:47 +1200
From: g.bogle at auckland.ac.nz
To: vtkusers at vtk.org
Subject: Re: [vtkusers] Problems when compiling simple program in Qt Creator


  
    
  
  
    I believe your include path should be
      simply:

      

      INCLUDEPATH += c:/VTK/Install-VTK5.10.1/include/vtk_5.10/
      

      Gib

      

      On 8/08/2013 5:14 p.m., Kenneth D'Aquila wrote:

    
    
      
      
        
          
            
              
                Hi All,

                  

                
                I am completely new to VTK and have not been able
                  to successfully compile one simple program.

                  

                  #include "vtkConeSource.h"
                  
                  int main()
                  {
                          //Create a cone source object
                  
                      vtkConeSource *cone = vtkConeSource::New();
                      cone->SetHeight(3.0);
                      cone->SetRadius(1.0);
                      cone->SetResolution(10);
                  
                  	return 0;
                  }
                  

                  

                
                When I try to compile, there are 32 undefined
                  references. For example,

                  

                  c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkGraphics.a(vtkConeSource.cxx.obj):vtkConeSource.cxx:(.text+0x1c):
                    undefined reference to
                    `vtkInformationVector::GetInformationObject(int)'

                  

                  

                  I have read other posts similar to this problem, but I
                  can't figure out what is wrong with my .pro file for
                  QtCreator.

                  

                
                from my .pro file:

                  

                  INCLUDEPATH += c:/VTK/Source-VTK5.10.1/Common
                  INCLUDEPATH += c:/VTK/Source-VTK5.10.1/Graphics
                  INCLUDEPATH += c:/VTK/Source-VTK5.10.1/Filtering
                  INCLUDEPATH += c:/VTK/Source-VTK5.10.1/Rendering
                  INCLUDEPATH += c:/VTK/Source-VTK5.10.1/Hybrid
                  INCLUDEPATH += c:/VTK/Source-VTK5.10.1/Imaging
                  INCLUDEPATH += c:/VTK/Install-VTK5.10.1/includes/vtk-5.10
                  
                  LIBS += c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkCommon.a
                  LIBS += c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtksys.a
                  LIBS += c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libQVTK.a
                  LIBS += c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkViews.a
                  LIBS += c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkWidgets.a
                  LIBS += c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkInfovis.a
                  LIBS += c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkRendering.a
                  LIBS += c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkGraphics.a
                  LIBS += c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkImaging.a
                  LIBS += c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkIO.a
                  LIBS += c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkFiltering.a
                  LIBS += c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkDICOMParser.a
                  LIBS += c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkpng.a
                  LIBS += c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtktiff.a
                  LIBS += c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkzlib.a
                  LIBS += c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkjpeg.a
                  LIBS += c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkalglib.a
                  LIBS += c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkexpat.a
                  LIBS += c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkverdict.a
                  LIBS += c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkmetaio.a
                  LIBS += c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkNetCDF.a
                  LIBS += c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtksqlite.a
                  LIBS += c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkexoIIc.a
                  LIBS += c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkftgl.a
                  LIBS += c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkfreetype.a
                  LIBS += c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkHybrid.a
                  
                  I have the source code in:
                  C:\VTK\Source-VTK5.10.1

                
                I have the build code from after mingw32-make in: 

                  C:\VTK\Build-VTK5.10.1

                
                I have the installed code from after mingw32-make
                  install in: 

                  C:\VTK\Install-VTK5.10.1

                
                

                
                I am on Windows and using the following software
                versions:

                

                VTK 5.10.1

              
              QtCreator 2.8.0

            
            Qt 4.8.5

          
          minGW 4.7.2, 32 bit, 

          
          

          
          VTK and Qt were compiled from source with minGW.

          

        
        Any help would be appreciated. Thanks,

        

        Ken
        

      
      

      
      

      _______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers

    
    

    

    -- 
Dr. Gib Bogle
Senior Research Fellow
Auckland Bioengineering Institute
University of Auckland
New Zealand

http://www.bioeng.auckland.ac.nz

g.bogle at auckland.ac.nz
(64-9) 373-7599 Ext. 87030

  


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130812/42ccce40/attachment.htm>


More information about the vtkusers mailing list