title: MSYS2 on Windows 10 With Glade ( gtk_entry_get_text: assertion 'GTK_IS_ENTRY (entry)' failed )
body: <p>Unfortunately I'm new to programming in C and I'm experiencing many problems with external libraries compatibility between linux and windows.</p>
  <p>I'm trying to learn how to use GTK 3, use Glade to create the interface and geany to write the code in GCC</p>
  <p>I'm looking for a solution on the internet for 4 days, but I don't understand how to solve it:</p>
  <p>Please be patient, I don't know who to ask by now.
  Thanks for your help.</p>
  <p>when the &quot;OK&quot; button is pressed.</p>
  <pre><code>Appair the message on the first gtkentry but the second entry still empty
  
  void gtk_entry_set_text (GtkEntry* otarget, const gchar* TargetText); //Give no action like no command exist
  </code></pre>
  <p>Code written in GCC via Geany</p>
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;gtk/gtk.h&gt;
  #include &lt;gmodule.h&gt;
  
  int main(int argc, char *argv[])
  {
      GtkBuilder      *builder; 
      GtkWidget       *window;
      
      
      gtk_init(&amp;argc, &amp;argv);
  
      builder = gtk_builder_new();
      gtk_builder_add_from_file (builder, &quot;test.glade&quot;, NULL);
  
      window = GTK_WIDGET(gtk_builder_get_object(builder, &quot;TestWin&quot;));
  
      
      
      gtk_builder_connect_signals(builder, NULL);
  
      g_object_unref(builder);
  
      gtk_widget_show(window);                
      gtk_main();
  
      return 0;
  }
  
  
  // I have to put (extern &quot;C&quot; G_MODULE_EXPORT ) because without  give Could not find signal handler 'on_ok_button_clicked'.  Did you compile with -rdynamic?
  
  extern &quot;C&quot; G_MODULE_EXPORT void on_ok_button_clicked(GtkButton *msgbox_ok, GtkEntry *origin, GtkEntry *target, gpointer user_data)
  {
          
      
          
          const gchar *OriginText;
          const gchar *TargetText;
  
          OriginText = gtk_entry_get_text (GTK_ENTRY (origin)); // gtk_entry_get_text: assertion 'GTK_IS_ENTRY (entry)' failed
          
          TargetText = OriginText;
          
          void gtk_entry_set_text (GtkEntry *target, const gchar *TargetText); //Give no action like no command exist
  
  
          
      
  }
  extern &quot;C&quot; G_MODULE_EXPORT void on_cancel_button_clicked(GtkButton *cancel_button, gpointer user_data)
  {
      gtk_main_quit();
  }
  extern &quot;C&quot; G_MODULE_EXPORT void on_TestWin_destroy(GtkWidget *TestWin, gpointer user_data)
  {
      
          gtk_main_quit();
  }
  </code></pre>
  <p>File test.glade in XML creato con Glade 3</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;!-- Generated with glade 3.22.1 --&gt;
  &lt;interface&gt;
    &lt;requires lib=&quot;gtk+&quot; version=&quot;3.20&quot;/&gt;
    &lt;object class=&quot;GtkWindow&quot; id=&quot;TestWin&quot;&gt;
      &lt;property name=&quot;can_focus&quot;&gt;False&lt;/property&gt;
      &lt;property name=&quot;default_width&quot;&gt;420&lt;/property&gt;
      &lt;property name=&quot;default_height&quot;&gt;200&lt;/property&gt;
      &lt;signal name=&quot;destroy&quot; handler=&quot;on_TestWin_destroy&quot; swapped=&quot;no&quot;/&gt;
      &lt;child&gt;
        &lt;placeholder/&gt;
      &lt;/child&gt;
      &lt;child&gt;
        &lt;object class=&quot;GtkFixed&quot;&gt;
          &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
          &lt;property name=&quot;can_focus&quot;&gt;False&lt;/property&gt;
          &lt;child&gt;
            &lt;object class=&quot;GtkButton&quot; id=&quot;ok_button&quot;&gt;
              &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;OK&lt;/property&gt;
              &lt;property name=&quot;width_request&quot;&gt;95&lt;/property&gt;
              &lt;property name=&quot;height_request&quot;&gt;35&lt;/property&gt;
              &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
              &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
              &lt;property name=&quot;receives_default&quot;&gt;True&lt;/property&gt;
              &lt;signal name=&quot;clicked&quot; handler=&quot;on_ok_button_clicked&quot; swapped=&quot;no&quot;/&gt;
            &lt;/object&gt;
            &lt;packing&gt;
              &lt;property name=&quot;x&quot;&gt;190&lt;/property&gt;
              &lt;property name=&quot;y&quot;&gt;130&lt;/property&gt;
            &lt;/packing&gt;
          &lt;/child&gt;
          &lt;child&gt;
            &lt;object class=&quot;GtkButton&quot; id=&quot;cancel_button&quot;&gt;
              &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Cancell&lt;/property&gt;
              &lt;property name=&quot;width_request&quot;&gt;100&lt;/property&gt;
              &lt;property name=&quot;height_request&quot;&gt;35&lt;/property&gt;
              &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
              &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
              &lt;property name=&quot;receives_default&quot;&gt;True&lt;/property&gt;
              &lt;signal name=&quot;clicked&quot; handler=&quot;on_cancel_button_clicked&quot; swapped=&quot;no&quot;/&gt;
            &lt;/object&gt;
            &lt;packing&gt;
              &lt;property name=&quot;x&quot;&gt;300&lt;/property&gt;
              &lt;property name=&quot;y&quot;&gt;130&lt;/property&gt;
            &lt;/packing&gt;
          &lt;/child&gt;
          &lt;child&gt;
            &lt;object class=&quot;GtkEntry&quot; id=&quot;origin&quot;&gt;
              &lt;property name=&quot;width_request&quot;&gt;300&lt;/property&gt;
              &lt;property name=&quot;height_request&quot;&gt;35&lt;/property&gt;
              &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
              &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
            &lt;/object&gt;
            &lt;packing&gt;
              &lt;property name=&quot;x&quot;&gt;100&lt;/property&gt;
              &lt;property name=&quot;y&quot;&gt;20&lt;/property&gt;
            &lt;/packing&gt;
          &lt;/child&gt;
          &lt;child&gt;
            &lt;object class=&quot;GtkEntry&quot; id=&quot;target&quot;&gt;
              &lt;property name=&quot;width_request&quot;&gt;300&lt;/property&gt;
              &lt;property name=&quot;height_request&quot;&gt;35&lt;/property&gt;
              &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
              &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
            &lt;/object&gt;
            &lt;packing&gt;
              &lt;property name=&quot;x&quot;&gt;100&lt;/property&gt;
              &lt;property name=&quot;y&quot;&gt;60&lt;/property&gt;
            &lt;/packing&gt;
          &lt;/child&gt;
          &lt;child&gt;
            &lt;object class=&quot;GtkLabel&quot; id=&quot;lbl_origin&quot;&gt;
              &lt;property name=&quot;width_request&quot;&gt;90&lt;/property&gt;
              &lt;property name=&quot;height_request&quot;&gt;35&lt;/property&gt;
              &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
              &lt;property name=&quot;can_focus&quot;&gt;False&lt;/property&gt;
              &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Origin Text&lt;/property&gt;
            &lt;/object&gt;
            &lt;packing&gt;
              &lt;property name=&quot;x&quot;&gt;5&lt;/property&gt;
              &lt;property name=&quot;y&quot;&gt;20&lt;/property&gt;
            &lt;/packing&gt;
          &lt;/child&gt;
          &lt;child&gt;
            &lt;object class=&quot;GtkLabel&quot; id=&quot;lbl_target&quot;&gt;
              &lt;property name=&quot;width_request&quot;&gt;90&lt;/property&gt;
              &lt;property name=&quot;height_request&quot;&gt;35&lt;/property&gt;
              &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
              &lt;property name=&quot;can_focus&quot;&gt;False&lt;/property&gt;
              &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Target Text&lt;/property&gt;
            &lt;/object&gt;
            &lt;packing&gt;
              &lt;property name=&quot;x&quot;&gt;5&lt;/property&gt;
              &lt;property name=&quot;y&quot;&gt;60&lt;/property&gt;
            &lt;/packing&gt;
          &lt;/child&gt;
        &lt;/object&gt;
      &lt;/child&gt;
    &lt;/object&gt;
  &lt;/interface&gt;
  </code></pre>
  <p>Command used for compilation under Windows 10</p>
  <pre><code>gcc  -pthread -mms-bitfields -IC:/msys64/mingw64/include/gtk-3.0 -IC:/msys64/mingw64/include/cairo -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include/pango-1.0 -IC:/msys64/mingw64/include/fribidi -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include/atk-1.0 -IC:/msys64/mingw64/include/cairo -IC:/msys64/mingw64/include/pixman-1 -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include/freetype2 -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include/harfbuzz -IC:/msys64/mingw64/include/libpng16 -IC:/msys64/mingw64/include/gdk-pixbuf-2.0 -IC:/msys64/mingw64/include -IC:/msys64/mingw64/lib/libffi-3.2.1/include -IC:/msys64/mingw64/include/glib-2.0 -IC:/msys64/mingw64/lib/glib-2.0/include -IC:/msys64/mingw64/include test.cpp -o test -LC:/msys64/mingw64/lib -lgtk-3 -lgdk-3 -lz -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid -lwinmm -ldwmapi -lsetupapi -lcfgmgr32 -lpangowin32-1.0 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lintl -lglib-2.0
  </code></pre>