title: An "Undefined symbols" for GSL
body: <p>I am learning C++ and GSL(GNU Scientific Library). I try to use vscode to build a simple program but I got this error.</p>
  
  <pre><code>Undefined symbols for architecture x86_64:
    "_gsl_rng_types_setup", referenced from:
      _main in Playground-0f069f.o
  ld: symbol(s) not found for architecture x86_64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  </code></pre>
  
  <p>My code is this</p>
  
  <pre><code>#include &lt;gsl/gsl_rng.h&gt;
  #include &lt;iostream&gt;
  #include &lt;stdio.h&gt;
  #include &lt;stddef.h&gt;
  #include &lt;gsl/gsl_sort_double.h&gt;
  #include &lt;gsl/gsl_matrix.h&gt;
  
  int main(){
      const gsl_rng_type **t, **t0;
      t0 = gsl_rng_types_setup (); 
      for (t = t0; *t != 0; t++) {
          std::cout&lt;&lt;(*t)-&gt;name; 
      }
  }
  </code></pre>
  
  <p>And the <code>task.json</code> is</p>
  
  <pre><code>{
      // See https://go.microsoft.com/fwlink/?LinkId=733558
      // for the documentation about the tasks.json format
      "version": "0.1.0",
      "command": "g++",
      "isShellCommand": true,
      "args": ["-o", "Playground", "Playground.cpp"],
      "showOutput": "always"
  }
  </code></pre>
  
  <p>Any help much appreciated!</p>