title: What am I missing in compiler options for linking with JSON-C static library?
body: <p>I am trying to compile the <code>json-c-0.9</code> test binaries, while statically linking to <code>libjson.a</code>, which I have built and is sitting in <code>/path/to/json-c-0.9/lib</code>:</p>
  
  <pre><code>$ gcc -g -v -Wall -std=gnu99 -static -L/path/to/json-c-0.9/lib -ljson test1.c -o test1                                                  
  </code></pre>
  
  <p>I get numerous errors of the form:</p>
  
  <pre><code>/path/to/json-c-0.9/test1.c:17: undefined reference to `json_object_new_string'                                                        
  /path/to/json-c-0.9/test1.c:18: undefined reference to `json_object_get_string'                                                        
  /path/to/json-c-0.9/test1.c:19: undefined reference to `json_object_to_json_string'                                                    
  /path/to/json-c-0.9/test1.c:20: undefined reference to `json_object_put'                                                               
  /path/to/json-c-0.9/test1.c:22: undefined reference to `json_object_new_string'
  etc.
  </code></pre>
  
  <p>What I am missing in trying to compile the test binaries? Thanks for your advice.</p>