Re: [wxVTK] Installing wxVTK
Brought to you by:
malat
From: Mathieu M. <mat...@gm...> - 2008-12-24 13:20:01
|
On Tue, Dec 23, 2008 at 10:53 AM, Andrey Sklyar <sky...@gm...> wrote: > I compiled everything using cygwin, including VTK. I used these > options with cmake: > > BUILD_EXAMPLES ON > BUILD_SHARED_LIBS OFF > BUILD_TESTING ON > CMAKE_BACKWARDS_COMPATIBILITY 2.4 > CMAKE_BUILD_TYPE > CMAKE_INSTALL_PREFIX /usr/local > VTK_DATA_ROOT /usr/src/VTKData > VTK_USE_INFOVIS ON > VTK_USE_PARALLEL OFF > VTK_USE_RENDERING ON > VTK_USE_VIEWS ON > VTK_WRAP_JAVA OFF > VTK_WRAP_PYTHON OFF > VTK_WRAP_TCL OFF cmake option are not the important part. The important part were the compilation flags. export CFLAGS=blafoo export CXXFLAGS=foobar export CC=my_c-compiler export CXX=my_cxx_compiler THEN (and only afterward) can you start `cmake /path/to/src` *in an empty* directory. Do not report *any* message where you did not start from an empty directory ! > Would this still work with a VTK and wxVTK that was linked with cygwin? Yes. As long as you mix dll compiled with same compiler. VTK supports mingw type compiler (~equivalent to cygwin gcc with -mon-cygwin). > I did, and it didn't compile, so I went to the branch. I saw also > that they're using SVN now (http://www.wxwidgets.org/develop/svn.htm) > and that the cvs repository is "obsolete" > (http://wiki.wxwidgets.org/Cvs). I was talking about wxVTK, not wxWidgets. http://sourceforge.net/cvs/?group_id=114757 > I don't seem to have a wxrc executable... does the path that you have > for wxWidgets_wxrc_EXECUTABLE on your machine point to such an > executable? If it's not really needed, is there a way to turn it off > (so that cmake doesn't ask you for it)? If this does not work, replace the cmake entry with either `echo` of `ls` those are unix cmd that are available by default on any cygwin install. You do not need wxrc for compiling wxVTK AFAIK. > The reason I recompiled wxWidgets was because VTK was built with > cygwin libraries, No. At least not the one from vtk.org. > but wxWidgets was built without the. This lead lead > to the symbol mismatch problems you described. I think that ___assert > and ___errno were some of these symbols that weren't getting exported > the same way and thus causing errors. ok. > I will do that. Once I figure out which libraries I'm missing, how > should I edit CMakeList.txt to have cmake add the libraries to the > Makefile for linking? Is there a good online reference for CMake file > writing (I know there's the book for Kitware...)? Check out cmake wiki, google is your friend. Or else I found this: http://eris.liralab.it/yarp/specs/dox/dev/html/using_cmake.html You basically need: add_executable, add_library and target_link_libraries. Otherwise from the command line: $ cmake --help-commands | less if you know cmd contains the string `foobar` but dont remember proper spelling: $ cmake --help-command-list | grep -i foobar $ cmake --help-command my_complex_foobar_doh cmake mailing list is also an excellent ressource. 2cts -- Mathieu |