title: GLib usage with XCode
body: <p>I've been trying to use GLib in a project. I work with XCode. I downloaded Glib via Homebrew:</p>
  
  <pre><code>brew install glib
  </code></pre>
  
  <p>I then run</p>
  
  <pre><code>brew test glib
  </code></pre>
  
  <p>Which outputs</p>
  
  <pre><code>/usr/bin/clang -o test test.c -I/usr/local/Cellar/glib/2.36.3/include/glib-2.0 -I/usr/local/Cellar/glib/2.36.3/lib/glib-2.0/include -I/usr/local/opt/gettext/include -L/usr/local/Cellar/glib/2.36.3/lib -L/usr/local/opt/gettext/lib -lglib-2.0 -lintl -Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.9 -isysroot /Applications/Xcode5-DP6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
  </code></pre>
  
  <p>So, I copied all the -I arguments, and pasted them into XCode -> Project Settings -> Build Settings -> Other C Flags.</p>
  
  <p>In a .c file inside my XCode project I have</p>
  
  <pre><code>    GList  *processList_p = NULL;      /* Pointer to the process list */
  </code></pre>
  
  <p>If I compile everything works, but then if I call a function from GLib, such as</p>
  
  <pre><code>//Create the new list element, append it to the list and return the pointer.
  return g_list_append(processList, newProcess);
  </code></pre>
  
  <p>I get the error </p>
  
  <blockquote>
    <p>Undefined symbols for architecture x86_64:
      "_g_list_append", referenced from:
          _CreateProcess in Scheduler.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)</p>
  </blockquote>
  
  <p>I really have no idea what's going on, any help would be greatly appreciated.</p>