Hello,

I'm currently working with GTK 2.0, CMake and FindGTK2.cmake (from Philip
Lowman).

After some works on my system (ubuntu 8.04), we are currently trying to
merge our change on another plateform, with Ubuntu 8.10.

But, we encountered the following error during compilation :

[ 60%] Building C object CMakeFiles/SipSec.dir/main.c.o
> In file included from /usr/include/glib-2.0/gio/gio.h:40,
>                 from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
>                 from /usr/include/gtk-2.0/gdk/gdk.h:32,
>                 from /usr/include/gtk-2.0/gtk/gtk.h:32,
>                 from /home/kick/workspace/SipSec_unified/widgetUI.h:11,
>                 from /home/kick/workspace/SipSec_unified/main.c:15:
> /usr/include/glib-2.0/gio/gfile.h:333: error: syntax error before string
> constant
> /usr/include/glib-2.0/gio/gfile.h:333: warning: no semicolon at end of
> struct or union
> /usr/include/glib-2.0/gio/gfile.h:434: error: syntax error before '}' token
> make[2]: *** [CMakeFiles/SipSec.dir/main.c.o] Error 1
> make[1]: *** [CMakeFiles/SipSec.dir/all] Error 2
> make: *** [all] Error 2
>

We have make several test, in order to narrow our problem :
- we try to compile without gtk : no problem
- we try our CMake configuration with Hello World from GTK 2 project (which
include also the same gtk.h file)), and it's working perfectly.
- we try to compile on another system (my ubuntu 8.04), no problem

I don't know if it's a CMake related problem, but I'm hoping for some help
here ;)


/*
>  * Main.c
>  */
>
> #include <stdlib.h>
> #include "conf.h"
>
> #ifdef USE_GTK_GUI /* include GTK only if dependency needed */
> #include "widgetUI.h"
> #else /* include sip functionnalities in main only if directly needed */
> #include "sip/sip.h"
> #include <pjlib.h>
> #endif
>
> int main (int argc, char **argv)
> {
> #ifdef USE_GTK_GUI /* we want a GTK-based UI */
>     drawGUI(argc, argv);
>     return EXIT_SUCCESS;
> #else /* we prefer a command line interface. Use 'h' to hangup and 'q' to
> quit */
>     pj_status_t status;
>     if (argc > 1) {
>         status = sipUA(PJ_TRUE, argv[1]);
>     } else {
>         status = sipUA(PJ_FALSE, "");
>     }
>     return status;
> #endif /* USE_GTK_UI */
> }
>


/*
>  * widgetUI.h
>  */
>
> #ifndef WIDGETUI_H_
> #define WIDGETUI_H_
>
> #include <gtk/gtk.h>
> #include "gtkCallback.h"
>
> GtkWidget *window;
> GtkWidget *mainPanel;
> gchar * uri;
> GtkWidget * getButtonQuit(char * iconPath);
> GtkWidget * getButtonCall(char * iconPath, GtkComboBox * comboBox);
> GtkWidget * getButtonHangUp(char * iconPath);
> GtkWidget * getButtonHangUpQuit(char * iconPath);
> GtkWidget * getComboBox();
> GtkWidget * getBackGroundImage(char * imagePath);
> void drawCallingGui(char * uri);
> void drawWaitingGui();
> int drawGUI(int argc, char **argv);
> void drawErrorDialog(gchar * message);
> #endif /* WIDGETUI_H_ */
>


Regards,
-- 
Pierrick Grasland
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to