title: Cannot find -1dwmapi error: 1d returned 1 exit status on CodeBlocks, basic GCC application
body: <p>I am working on my college project.
  I am new to GCC, GTK and all related stuff.
  I have successfully installed GTK on Windows 10 via MSYS2.
  I have followed this tutorial:</p>
  <pre><code>https://www.youtube.com/watch?v=rUJFYOCbuDg
  </code></pre>
  <p>In the next part of tutorial,
  I am using Codeblocks (as discussed in the tutorial):</p>
  <pre><code>https://www.youtube.com/watch?v=TlwWKzJFNqo&amp;ab_channel=MichaelB.
  </code></pre>
  <p>When I copy paste this code in main.c in my project GTK3_Demo</p>
  <pre><code>#include &lt;gtk/gtk.h&gt;
  
  static int counter = 0;
  
  void greet(GtkWidget* widget, gpointer data)
  {
      // printf equivalent in GTK+
      g_print(&quot;Welcome to GTK\n&quot;);
      g_print(&quot;%s clicked %d times\n&quot;,
              (char*)data, ++counter);
  }
  
  void destroy(GtkWidget* widget, gpointer data)
  {
      gtk_main_quit();
  }
  
  int main(int argc, char* argv[])
  {
  
      GtkWidget* window;
      GtkWidget* button;
      gtk_init(&amp;argc, &amp;argv);
  
      window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
  
      g_signal_connect(window, &quot;destroy&quot;,
                      G_CALLBACK(destroy), NULL);
      /* Let's set the border width of the window to 20.
      * You may play with the value and see the
      * difference. */
      gtk_container_set_border_width(GTK_CONTAINER(window), 20);
  
      button = gtk_button_new_with_label(&quot;Click Me!&quot;);
  
      g_signal_connect(GTK_OBJECT(button),
                      &quot;clicked&quot;, G_CALLBACK(greet),
                      &quot;button&quot;);
  
      gtk_container_add(GTK_CONTAINER(window), button);
  
      gtk_widget_show_all(window);
  
      gtk_main();
  
      return 0;
  }
  </code></pre>
  <p>I get following error :</p>
  <pre><code>||=== Build: Debug in GTK3_Demo (compiler: GNU GCC Compiler) ===|
  C:\Users\raman\Documents\GTK3_Demo\main.c||In function 'activate':|
  C:\Users\raman\Documents\GTK3_Demo\main.c|23|warning: implicit declaration of function 'gtk_window_set_child' [-Wimplicit-function-declaration]|
  ld.exe||cannot find -ldwmapi|
  ||error: ld returned 1 exit status|
  ||=== Build failed: 2 error(s), 1 warning(s) (0 minute(s), 2 second(s)) ===|
  </code></pre>