[vtkusers] trouble setting up VTK for Qt creator

com comacke at gmail.com
Mon Aug 1 10:38:39 EDT 2011


Thanks for the help Clinton - I tried that out and it seemed to work. After
running CMake, I went into the VTK-build directory and found VTK.cbp. I
clicked on it and it open up the project in CodeBlocks. I'm not sure where
to go from here. When I did this in Visual Studio, there was a project in
the solution explorer called ALL_BUILD and another called INSTALL both of
which I was able to build. I looked for something similar in the CodeBlocks
project explorer and wasn't able to find anything. I also tried clicking
"build and run" in CodeBlocks and it gave me the following message:

You can't "run" a commands-only target...

I can go into the project properties and change the build/target type to
dynamic library, static library, console application or gui application. Do
I need to change to one of these or do I need to do something else
altogether?


On Fri, Jul 29, 2011 at 11:26 AM, Clinton Stimpson [via VTK] <
ml-node+4647590-2050230737-235024 at n5.nabble.com> wrote:

>
> You need to use mingw32-gcc.exe and mingw32-g++.exe as your C and CXX
> compiler.
>
> Can you just add C:/Program Files (x86)/CodeBlocks/MinGW/bin to your PATH
> environment variable and then have cmake-gui figure out which compilers and
>
> make programs to pick from that directory?
>
> Clint
>
> On Friday, July 29, 2011 08:01:45 am com wrote:
>
> > I deleted the cache in the CMAKE gui and started over again without any
> of
> > the Qt stuff - I' figured I'd add that in after the initial configure.
> This
> > is what I had set in the CMAKE gui to start.
> >
> > CMAKE_CXX_COMPILER      C:/Program Files (x86)/CodeBlocks/codeblocks.exe
> > CMAKE_C_COMPILER          C:/Program Files
> (x86)/CodeBlocks/codeblocks.exe
> > CMAKE_MAKE_PROGRAM   C:/Program Files
> > (x86)/CodeBlocks/MinGW/bin/mingw32-make.exe
> > CMAKE_SH                          - not filled in
> > CMAKE_USE_RELATIVE_PATHS - unchecked
> >
> > I get this error message when I press configure.
> >
> > The C compiler identification is unknown
> >
> > The CXX compiler identification is unknown
> >
> > Check for working C compiler: C:/Program Files
> > (x86)/CodeBlocks/codeblocks.exe
> >
> > Check for working C compiler: C:/Program Files
> > (x86)/CodeBlocks/codeblocks.exe -- broken
> >
> > CMake Error at C:/Program Files (x86)/CMake
> > 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
> >
> > The C compiler "C:/Program Files (x86)/CodeBlocks/codeblocks.exe" is not
> >
> > able to compile a simple test program.
> >
> > It fails with the following output:
> >
> > Change Dir: C:/Program Files (x86)/VTK_build/CMakeFiles/CMakeTmp
> >
> >  Run Build Command:C:/PROGRA~2/CODEBL~1/MinGW/bin/mingw32-make.exe
> >
> > "cmTryCompileExec/fast"
> >
> > C:/PROGRA~2/CODEBL~1/MinGW/bin/mingw32-make.exe -f
> >
> > CMakeFiles\cmTryCompileExec.dir\build.make
> >
> > CMakeFiles/cmTryCompileExec.dir/build
> >
> > mingw32-make.exe[1]: Entering directory `C:/Program Files
> >
> > (x86)/VTK_build/CMakeFiles/CMakeTmp'
> >
> > "C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E cmake_progress_report
>
> >
> > "C:\Program Files (x86)\VTK_build\CMakeFiles\CMakeTmp\CMakeFiles" 1
> >
> > Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.obj
> >
> > C:\PROGRA~2\CODEBL~1\CODEBL~1.EXE -o
> >
> > CMakeFiles\cmTryCompileExec.dir\testCCompiler.c.obj -c "C:\Program Files
> >
> > (x86)\VTK_build\CMakeFiles\CMakeTmp\testCCompiler.c"
> >
> > mingw32-make.exe[1]: ***
> >
> > [CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.obj] Error -1
> >
> > mingw32-make.exe[1]: Leaving directory `C:/Program Files
> >
> > (x86)/VTK_build/CMakeFiles/CMakeTmp'
> >
> > mingw32-make.exe: *** [cmTryCompileExec/fast] Error 2
> >
> >   CMake will not be able to correctly generate this project.
> >
> > Call Stack (most recent call first):
> >
> > CMakeLists.txt:9 (PROJECT)
> >
> > Not sure what to do here? This is my first time using CMAKE and I haven't
>
> > had much experience with makefiles in general, so please pardon my lack
> of
> > knowledge in this area.
> >
> > Jothy asked if I had built Qt using mingw. Yes, it was built using mingw.
>
> >
> >
> >
> > On Thu, Jul 28, 2011 at 9:54 AM, John Drescher-2 [via VTK] <
> >
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=4647590&i=0>>
> wrote:
> > > On Thu, Jul 28, 2011 at 10:51 AM, com <[hidden
> > > email]<http://user/SendEmail.jtp?type=node&node=4642998&i=0>>
> > >
> > > wrote:
> > > > Thanks for the advice. I downloaded CodeBlocks and and choose the
> > >
> > > CodeBlocks
> > >
> > > > - MinGW Makefiles options in CMake. I checked to see what compiler
> > > > CodeBlocks is using, and it says GNU GCC Compiler - not sure if this
> is
> > >
> > > what
> > >
> > > > I want or if I need something else. Unfortunately I get the following
>
> > >
> > > error
> > >
> > > > message:
> > > >
> > > > CMake Error: CMake was unable to find a build program corresponding
> to
> > > > "MinGW Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need
> to
> > > > select a different build tool.
> > >
> > > Find the directory for the make that mingw uses and set this variable
> > > in cmake-gui
> > >
> > > John
> > > _______________________________________________
> > > 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
> > >
> > >
> > > ------------------------------
> > >
> > >  If you reply to this email, your message will be added to the
> discussion
> > >
> > > below:
> > >
> > >
> http://vtk.1045678.n5.nabble.com/trouble-setting-up-VTK-for-Qt-creator-tp
> > > 4636528p4642998.html
> > >
> > >  To unsubscribe from trouble setting up VTK for Qt creator, click
> > >  here<
> http://vtk.1045678.n5.nabble.com/template/NamlServlet.jtp?macro=un
> > >
>  subscribe_by_code&node=4636528&code=Y29tYWNrZUBnbWFpbC5jb218NDYzNjUyOHw4
> > >  ODA1ODg2MjI=>.
> >
> > --
> > View this message in context:
> >
> http://vtk.1045678.n5.nabble.com/trouble-setting-up-VTK-for-Qt-creator-tp4
> > 636528p4647157.html Sent from the VTK - Users mailing list archive at
> > Nabble.com.
>
> --
> Clinton Stimpson
> Elemental Technologies, Inc
> Computational Simulation Software, LLC
> www.csimsoft.com
> _______________________________________________
> 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
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://vtk.1045678.n5.nabble.com/trouble-setting-up-VTK-for-Qt-creator-tp4636528p4647590.html
>  To unsubscribe from trouble setting up VTK for Qt creator, click here<http://vtk.1045678.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4636528&code=Y29tYWNrZUBnbWFpbC5jb218NDYzNjUyOHw4ODA1ODg2MjI=>.
>
>


--
View this message in context: http://vtk.1045678.n5.nabble.com/trouble-setting-up-VTK-for-Qt-creator-tp4636528p4655195.html
Sent from the VTK - Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110801/553da6e1/attachment.htm>


More information about the vtkusers mailing list