Migrate from GitHub to SourceForge with this tool. Check out all of SourceForge's recent improvements.
Close

#2 CMake error

closed-fixed
None
5
2007-02-14
2006-12-07
No

running ubuntu linux 6.10 : CMake repports an error : "Cannot find wxWindows libraries and/or header files".

the problem is solved by changing in the CMakeLists.txt all references to WXWINDOWS_FOUND to wxWidgets_FOUND.

but compilation still fails. What are the exact dependencies for this project?

Discussion

  • David Jany

    David Jany - 2006-12-16

    Logged In: YES
    user_id=1106069
    Originator: NO

    I'm running also on Ubuntu Linux 6.10

    I had to change more things in CMakeLists.txt to make it work, but today I fetched the official CVS-Versions of FindwxWidgets.cmake and UsewxWidgets.cmake from CMAKE (http://www.cmake.org/HTML/Download.html#cvs) and they worked for me too.

    I think I made some more changes to the CMAKE-GTK-Scripts, but maybe it's working for You without these changes. If You still have problems I could send You my scripts.

     
  • Nobody/Anonymous

    Logged In: NO

    Yep, I'd love that...

    By tweaking the FindwxWidgets.cmake I've been able to compile the files, but then I got linking problems (related to glcanvas library not found). As I understand, this problem comes from the GTK Cmake scripts, which I tried to modify also but without success, so If you can send me your file, I'd be glad. Maybe the best to do would be to attach the file to this thread, no?

    Thanks,
    Sebastien

     
  • Sebastien Valette

    Logged In: YES
    user_id=1663239
    Originator: YES

    Thanks David!
    I've been able to use your attached files for compilation. Finally, the trick was to use the FindGTK2.cmake file instead of FindGTK.cmake.

    Looking at the cmake CVS, I could not find this file, so if I get things right, the ability to link against GTK 2.0 libraries is not enabled in the stock CMake, no?

    Sebastien

     
  • Mathieu Malaterre

    Logged In: YES
    user_id=736197
    Originator: NO

    Please try the wxVTK 1.1 it requires CMake 2.4.4 and above but it should not works.
    Thanks

     
  • Mathieu Malaterre

    • assigned_to: nobody --> malat
     
  • Sebastien Valette

    Logged In: YES
    user_id=1663239
    Originator: YES

    with CMake 4.4, the compilation results for wxVTK 1.1 repports those errors.

    [ 10%] Building CXX object CMakeFiles/wxImagePlaneWidget.dir/src/wxVTKRenderWindowInteractor.o
    /home/valette/prog/wxVTK/src/wxVTKRenderWindowInteractor.cxx:54:81: error: gdk/gdkx.h: Aucun fichier ou répertoire de ce type
    /home/valette/prog/wxVTK/src/wxVTKRenderWindowInteractor.cxx:55:32: error: gdk/gdkprivate.h: Aucun fichier ou répertoire de ce type
    In file included from /home/valette/prog/wxVTK/src/wxVTKRenderWindowInteractor.cxx:57:
    /usr/include/wx-2.6/wx/gtk/win_gtk.h:18:21: error: gdk/gdk.h: Aucun fichier ou répertoire de ce type
    /usr/include/wx-2.6/wx/gtk/win_gtk.h:20:30: error: gtk/gtkcontainer.h: Aucun fichier ou répertoire de ce type
    /usr/include/wx-2.6/wx/gtk/win_gtk.h:21:31: error: gtk/gtkadjustment.h: Aucun fichier ou répertoire de ce type
    /usr/include/wx-2.6/wx/gtk/win_gtk.h:56: error: ‘GtkContainer’ does not name a type
    /usr/include/wx-2.6/wx/gtk/win_gtk.h:57: error: expected ‘;’ before ‘*’ token
    /usr/include/wx-2.6/wx/gtk/win_gtk.h:68: error: ‘GdkVisibilityState’ does not name a type
    /usr/include/wx-2.6/wx/gtk/win_gtk.h:73: error: ‘gboolean’ does not name a type
    /usr/include/wx-2.6/wx/gtk/win_gtk.h:74: error: ‘gboolean’ does not name a type
    /usr/include/wx-2.6/wx/gtk/win_gtk.h:75: error: ‘gboolean’ does not name a type
    /usr/include/wx-2.6/wx/gtk/win_gtk.h:80: error: ‘GtkContainerClass’ does not name a type
    /usr/include/wx-2.6/wx/gtk/win_gtk.h:88: error: ‘GtkType’ does not name a type
    /usr/include/wx-2.6/wx/gtk/win_gtk.h:98: error: ‘gboolean’ has not been declared
    /usr/include/wx-2.6/wx/gtk/win_gtk.h:102: error: ‘gboolean’ has not been declared
    /usr/include/wx-2.6/wx/gtk/win_gtk.h:106: error: ‘gboolean’ has not been declared
    /home/valette/prog/wxVTK/src/wxVTKRenderWindowInteractor.cxx: In member function ‘long int wxVTKRenderWindowInteractor::GetHandleHack()’:
    /home/valette/prog/wxVTK/src/wxVTKRenderWindowInteractor.cxx:316: error: ‘gtk_pizza_get_type’ was not declared in this scope
    /home/valette/prog/wxVTK/src/wxVTKRenderWindowInteractor.cxx:316: error: expected primary-expression before ‘)’ token
    /home/valette/prog/wxVTK/src/wxVTKRenderWindowInteractor.cxx:316: error: ‘GTK_CHECK_CAST’ was not declared in this scope
    /home/valette/prog/wxVTK/src/wxVTKRenderWindowInteractor.cxx:316: error: ‘GDK_WINDOW_XWINDOW’ was not declared in this scope
    /home/valette/prog/wxVTK/src/wxVTKRenderWindowInteractor.cxx:316: error: invalid use of undefined type ‘struct _GtkWidget’
    /usr/include/wx-2.6/wx/defs.h:2777: error: forward declaration of ‘struct _GtkWidget’
    make[2]: *** [CMakeFiles/wxImagePlaneWidget.dir/src/wxVTKRenderWindowInteractor.o] Erreur 1
    make[1]: *** [CMakeFiles/wxImagePlaneWidget.dir/all] Erreur 2
    make: *** [all] Erreur 2

    I guess the problem still comes from the GTK libraries (I will further analyse this issue)

     
  • David Jany

    David Jany - 2007-01-30

    Logged In: YES
    user_id=1106069
    Originator: NO

    "Aucun fichier ou répertoire de ce type" means "No such file or directory" in english, right?

    If that's so, your CMake-Modules are not configured properly. If your using a changed version of my modules offered below, you only have to change wxVTK's CMakeLists.txt. Here's the patch:

    --- /media/MISC/2007-01-29/wxVTK/CMakeLists.txt
    +++ /opt/wxVTK/CMakeLists.txt
    @@ -1,7 +1,7 @@
    PROJECT (wxVTKSample)
    # Well technicall you also need:
    # http://cmake.org/Bug/bug.php?op=show&bugid=3582
    -CMAKE_MINIMUM_REQUIRED(VERSION 2.4.4)
    +CMAKE_MINIMUM_REQUIRED(VERSION 2.4)#.4)

    #TODO: - try the MOTIF version
    # - try the MAC version (done !)
    @@ -34,8 +34,10 @@
    IF(NOT VTK_USE_X)
    MESSAGE(FATAL_ERROR "You need to have VTK_USE_X")
    ENDIF(NOT VTK_USE_X)
    - FIND_PACKAGE(GTK REQUIRED)
    - INCLUDE_DIRECTORIES(${GTK_INCLUDE_DIR} )
    +# FIND_PACKAGE(GTK REQUIRED)
    +# INCLUDE_DIRECTORIES(${GTK_INCLUDE_DIR} )
    + FIND_PACKAGE(GTK2 REQUIRED)
    + INCLUDE_DIRECTORIES(${GTK2_INCLUDE_DIRS} )
    # CMake 2.4.6:
    #FIND_PACKAGE(PkgConfig REQUIRED)
    #pkg_check_modules (GTK2 gtk+-2.0)

    Change GTK to GTK2, as long as you're using GTK2-Module-Files.

    At least you have to check your CMake-settings for wxVTK. Maybe your CMake-configuration only can't find the proper gdk-paths? Here they are for manual configuration:
    ...
    GTK2_GDKCONFIG_INCLUDE_PATH /usr/lib/gtk-2.0/include
    GTK2_GDK_INCLUDE_PATH /usr/include/gtk-2.0/gdk
    GTK2_GDK_LIBRARY /usr/lib/libgdk-x11-2.0.so
    ...

    As you can see I've patched CMakeLists.txt to work with CMake 2.4 and up. Thats because I'm using CMake 2.4.3 and it seems to work properly for my. I couldn't find any information, why exactly CMake 2.4.4 and up should be used...

     
  • Mathieu Malaterre

    Logged In: YES
    user_id=736197
    Originator: NO

    Ok one more try !
    I have just released wxVTK 1.2 it uses pkg-config (recommended for gtk2). This should work for you (hopefully).
    If not please stick to 'davidjany' solution (I might add it to the wxVTK CVS directory if so).

    Warning: require CMake 2.4.5 or above.

     
  • Sebastien Valette

    Logged In: YES
    user_id=1663239
    Originator: YES

    thanks guys. I think I will stick with davidjany's solution, which works pretty well (only one file to add).

    Just for the information, I tried the 1.2 version of wxVTK, and with CMake 2.4.5, I have an error : it does not find PkgConfigConfig.cmake. In the CMake/Modules directory, there is no such file, but UsePkgConfig.cmake does exist there.

     
  • David Jany

    David Jany - 2007-02-01

    Logged In: YES
    user_id=1106069
    Originator: NO

    I've just changed to
    - wxVTK 1.2
    - wxWidgets 2.8
    - CMake 2.4.6
    (FindPkgConfig.cmake and UsePkgConfig.cmake have to be downloaded from CVS and saved to the modules-directory)

    The installation itself was no mess (see info above), but problems occurred while using wxVTK 1.2-widgets. The widgets, now based upon wxWindow seem to have issues on refreshing its content for example after moving another window over them. I've not found any information how to solve this issue yet. So it might be a good decision to work with wxVTK 1.1 within a gtk-based-system until a solution is known.

    Maybe this is no issue but some sort of configuration problem. Any ideas?

     
  • David Jany

    David Jany - 2007-02-08

    Logged In: YES
    user_id=1106069
    Originator: NO

    Because of known problems concerning wxWidgets 2.8, I'm now using wxWidgets 2.6 again. With wxVTK 1.2 my old solution isn't needed anymore. Because the "CMake error" seems to be fixed I'll delete the file linked below in comment 2006-12-17 00:16.

    Thanks

     
  • Mathieu Malaterre

    • status: open --> closed-fixed
     

Log in to post a comment.