title: Clion linking fails
body: <p>I have a header file</p>
  
  <pre><code>// Creates a new graph with n vertices and no edges
  graph_t *graph_create(int n);
  </code></pre>
  
  <p>A .c file</p>
  
  <pre><code>graph_t *graph_create(int n)
  {
      graph_t *g;
      int     i;
  
      //g = malloc(sizeof(graph_t));
      g-&gt;V = n;
      g-&gt;E = 0; 
  
      return g;
  }
  </code></pre>
  
  <p>This is how my <code>CMakeLists.txt</code> looks like</p>
  
  <pre><code>cmake_minimum_required(VERSION 3.3)
  project(Thesis)
  
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
  
  set(SOURCE_FILES main.cpp graph.h graph.c shared.h)
  add_executable(Thesis ${SOURCE_FILES})
  </code></pre>
  
  <p>I call <code>graph_t *g = graph_create(15);</code> from <code>main.cpp</code> and I get the following error saying that the method is undefined:</p>
  
  <blockquote>
    <p>"C:\Program Files (x86)\JetBrains\CLion 1.2.4\bin\cmake\bin\cmake.exe"
    --build C:\Users\Shiro.CLion12\system\cmake\generated\6e6ca233\6e6ca233\Debug
    --target Thesis -- -j 8 Scanning dependencies of target Thesis [ 66%] Building CXX object CMakeFiles/Thesis.dir/main.cpp.obj [ 66%] Building
    C object CMakeFiles/Thesis.dir/graph.c.obj [100%] Linking CXX
    executable Thesis.exe CMakeFiles\Thesis.dir/objects.a(main.cpp.obj):
    In function <code>main': C:/Users/Shiro/ClionProjects/Thesis/main.cpp:7:
    undefined reference to</code>graph_create(int)' collect2.exe: error: ld
    returned 1 exit status CMakeFiles\Thesis.dir\build.make:121: recipe
    for target 'Thesis.exe' failed mingw32-make.exe[3]:  [Thesis.exe]
    Error 1 CMakeFiles\Makefile2:66: recipe for target
    'CMakeFiles/Thesis.dir/all' failed CMakeFiles\Makefile2:78: recipe for
    target 'CMakeFiles/Thesis.dir/rule' failed Makefile:117: recipe for
    target 'Thesis' failed mingw32-make.exe[2]: 
    [CMakeFiles/Thesis.dir/all] Error 2 mingw32-make.exe[1]:
    [CMakeFiles/Thesis.dir/rule] Error 2 mingw32-make.exe:  [Thesis]
    Error 2</p>
  </blockquote>
  
  <p>What am I doing wrong ?</p>