Hello,<br><br>I'm currently working with GTK 2.0, CMake and FindGTK2.cmake (from Philip Lowman).<br><br>After some works on my system (ubuntu 8.04), we are currently trying to merge our change on another plateform, with Ubuntu 8.10.<br>
<br>But, we encountered the following error during compilation :<br><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex; color: rgb(51, 51, 255);" class="gmail_quote">
<span dir="ltr" id=":2bg">[ 60%] Building C object CMakeFiles/SipSec.dir/main.c.o</span><br><span dir="ltr" id=":2bg">In file included from /usr/include/glib-2.0/gio/gio.h:40,</span><br><span dir="ltr" id=":2bg"> from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,</span><br>
<span dir="ltr" id=":2bg"> from /usr/include/gtk-2.0/gdk/gdk.h:32,</span><br><span dir="ltr" id=":2bg"> from /usr/include/gtk-2.0/gtk/gtk.h:32,</span><br><span dir="ltr" id=":2bg"> from /home/kick/workspace/SipSec_unified/widgetUI.h:11,</span><br>
<span dir="ltr" id=":2bg"> from /home/kick/workspace/SipSec_unified/main.c:15:</span><br><span dir="ltr" id=":2bg">/usr/include/glib-2.0/gio/gfile.h:333: error: syntax error before string constant</span><br>
<span dir="ltr" id=":2bg">/usr/include/glib-2.0/gio/gfile.h:333: warning: no semicolon at end of struct or union</span><br><span dir="ltr" id=":2bg">/usr/include/glib-2.0/gio/gfile.h:434: error: syntax error before '}' token</span><br>
<span dir="ltr" id=":2bg">make[2]: <b>*</b> [CMakeFiles/SipSec.dir/main.c.o] Error 1</span><br><span dir="ltr" id=":2bg">make[1]: <b>*</b> [CMakeFiles/SipSec.dir/all] Error 2</span><br><span dir="ltr" id=":2bg">make: <b>*</b> [all] Error 2</span><br>
</blockquote><br>We have make several test, in order to narrow our problem :<br>- we try to compile without gtk : no problem<br>- 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.<br>
- we try to compile on another system (my ubuntu 8.04), no problem<br><br>I don't know if it's a CMake related problem, but I'm hoping for some help here ;)<br><br><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
<span style="color: rgb(153, 0, 0);">/*</span><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);"> * Main.c</span><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);"> */</span><br style="color: rgb(153, 0, 0);">
<br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);">#include <stdlib.h></span><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);">#include "conf.h"</span><br style="color: rgb(153, 0, 0);">
<br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);">#ifdef USE_GTK_GUI /* include GTK only if dependency needed */</span><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);">#include "widgetUI.h"</span><br style="color: rgb(153, 0, 0);">
<span style="color: rgb(153, 0, 0);">#else /* include sip functionnalities in main only if directly needed */</span><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);">#include "sip/sip.h"</span><br style="color: rgb(153, 0, 0);">
<span style="color: rgb(153, 0, 0);">#include <pjlib.h></span><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);">#endif</span><br style="color: rgb(153, 0, 0);"><br style="color: rgb(153, 0, 0);">
<span style="color: rgb(153, 0, 0);">int main (int argc, char **argv)</span><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);">{</span><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);">#ifdef USE_GTK_GUI /* we want a GTK-based UI */</span><br style="color: rgb(153, 0, 0);">
<span style="color: rgb(153, 0, 0);"> drawGUI(argc, argv);</span><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);"> return EXIT_SUCCESS;</span><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);">#else /* we prefer a command line interface. Use 'h' to hangup and 'q' to quit */</span><br style="color: rgb(153, 0, 0);">
<span style="color: rgb(153, 0, 0);"> pj_status_t status;</span><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);"> if (argc > 1) {</span><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);"> status = sipUA(PJ_TRUE, argv[1]);</span><br style="color: rgb(153, 0, 0);">
<span style="color: rgb(153, 0, 0);"> } else {</span><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);"> status = sipUA(PJ_FALSE, "");</span><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);"> }</span><br style="color: rgb(153, 0, 0);">
<span style="color: rgb(153, 0, 0);"> return status;</span><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);">#endif /* USE_GTK_UI */</span><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);">}</span><br>
</blockquote><br><br style="color: rgb(204, 0, 0);"><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex; color: rgb(204, 0, 0);" class="gmail_quote">/*<br> * widgetUI.h<br>
*/ <br><br>#ifndef WIDGETUI_H_<br>#define WIDGETUI_H_<br><br>#include <gtk/gtk.h><br>#include "gtkCallback.h"<br><br>GtkWidget *window;<br>GtkWidget *mainPanel;<br>gchar * uri;<br>GtkWidget * getButtonQuit(char * iconPath);<br>
GtkWidget * getButtonCall(char * iconPath, GtkComboBox * comboBox);<br>GtkWidget * getButtonHangUp(char * iconPath);<br>GtkWidget * getButtonHangUpQuit(char * iconPath);<br>GtkWidget * getComboBox();<br>GtkWidget * getBackGroundImage(char * imagePath);<br>
void drawCallingGui(char * uri);<br>void drawWaitingGui();<br>int drawGUI(int argc, char **argv);<br>void drawErrorDialog(gchar * message);<br>#endif /* WIDGETUI_H_ */<br></blockquote><br><br>Regards, <br>-- <br>Pierrick Grasland<br>
<br>