[vtkusers] Include files
Gib Bogle
g.bogle at auckland.ac.nz
Wed Sep 1 00:12:50 EDT 2010
Aashish Chaudhary wrote:
> Gib,
>
> You can generate CodeBlocks project file and then use that project
> file in the QTCreator.
>
> This is the procedure I follow:
>
> 1. ccmake -G "CodeBlocks - Unix Makefiles PATH_TO_CmakeLists.txt
> 2. Enter all the required paths, libs, flags.
> 3. Open QTCreator. Open CMakeLists.txt.
> 4. Point the build directory to the dir when you ran (1)
> 5. Hit finish
>
> you still have to write your own CMakelists.txt which is quite simple
> if you are using QT and VTK (you can look at the QT VTK examples).
>
> hope this helps.
>
> thanks,
Hi Aashish,
I did something similar to what you suggested (I think). First I made a simple
CMakeLists.txt file by customizing the Qt example provided. I did
cmake -G "CodeBlocks - MinGW Makefiles" CMakeLists.txt
in the directory where my code resides.
I then started CodeBlocks, opened CMakeLists.txt, and asked for a build. To my
surprise it built application.exe, which runs as expected.
There is one difference between this and the executable I'd previously built
with QtCreator (manually handling the include files). The CB executable is 3713
KB, while the QtCreated one is 475 KB. I'm guessing that the difference is that
the CB version has statically linked the Qt and/or VTK libraries. Is this
correct? If so, would you be so kind as to tell me how to tell CMake (or CB) to
use dynamic linking?
Thanks
Gib
More information about the vtkusers
mailing list