title: Curl with Catalina C++ failing and getting "Undefined symbols for architecture x86_64"
body: <p>I am trying to run an example c++ program with Catalina 10.15:</p>
  
  <pre><code>#include &lt;/usr/local/opt/curl/include/curl/curl.h&gt;
  
  int main(void) {
  
      CURL* curl;
      CURLcode result;
  
      curl = curl_easy_init();
      curl_easy_setopt(curl, CURLOPT_URL, "https://www.wikipedia.org");
  
      result = curl_easy_perform(curl);
  
      curl_easy_cleanup(curl);
  
      return 0;
  }
  </code></pre>
  
  <p>I have installed curl with:</p>
  
  <pre><code>brew install curl
  </code></pre>
  
  <p>I don't understand why this is not working and I am getting:</p>
  
  <pre><code>Scanning dependencies of target 2700
  [ 50%] Building CXX object CMakeFiles/2700.dir/main.cpp.o
  [100%] Linking CXX executable 2700
  Undefined symbols for architecture x86_64:
    "_curl_easy_cleanup", referenced from:
        _main in main.cpp.o
    "_curl_easy_init", referenced from:
        _main in main.cpp.o
    "_curl_easy_perform", referenced from:
        _main in main.cpp.o
    "_curl_easy_setopt", referenced from:
        _main in main.cpp.o
  ld: symbol(s) not found for architecture x86_64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  make[3]: *** [2700] Error 1
  make[2]: *** [CMakeFiles/2700.dir/all] Error 2
  make[1]: *** [CMakeFiles/2700.dir/rule] Error 2
  make: *** [2700] Error 2
  </code></pre>
  
  <p>My CMakeLists.txt is as follows:</p>
  
  <pre><code>cmake_minimum_required(VERSION 3.15.3)
  project(2700)
  
  include_directories(/usr/local/opt/curl/include/)
  
  set(CMAKE_CXX_STANDARD 17)
  
  add_executable(2700 main.cpp )
  </code></pre>
  
  <p>I am using CLion and I am fairly new to C++, especially on MacOS.</p>
  
  <p>What can I do do get the curl working and not get the issue?</p>