title: Trying to use JetBrains CLion, but Cmake - c++ compiler broken after cygwin install
body: <p>I have been trying to get JetBrains CLion IDE working, but I am running into a problem with Cmake and none of my research online has been helpful. I installed cygwin with the necessary packages (as stated <a href="https://blog.jetbrains.com/clion/2014/09/clion-answers-frequently-asked-questions/" rel="nofollow noreferrer">here</a> - gcc/g++, cmake, make, gdb). When I open up CLion and go into Settings (I'm running Windows 10) under Build>Toolchains>Debugger everything has a check next to it, so it seems like CLion has found everything alright, but when I look in the Debugger window I get the following error:</p>
  
  <pre><code>    "C:\Users\Lucas Lofaro\.CLion2016.3\system\cygwin_cmake\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" "/cygdrive/c/Users/Lucas Lofaro/ClionProjects/cracking_the_coding_interview"
      -- The CXX compiler identification is GNU 5.3.0
      -- Check for working CXX compiler: /usr/bin/c++.exe
      -- Check for working CXX compiler: /usr/bin/c++.exe -- broken
      CMake Error at /cygdrive/c/Users/Lucas Lofaro/.CLion2016.3/system/cygwin_cmake/share/cmake-3.6.2/Modules/CMakeTestCXXCompiler.cmake:54 (message):
        The C++ compiler "/usr/bin/c++.exe" is not able to compile a simple test
        program.
  
        It fails with the following output:
  
         Change Dir: /cygdrive/c/Users/Lucas Lofaro/ClionProjects/cracking_the_coding_interview/cmake-build-debug/CMakeFiles/CMakeTmp
  
  
  
        Run Build Command:"/usr/bin/make.exe" "cmTC_96921/fast"
  
        /usr/bin/make -f CMakeFiles/cmTC_96921.dir/build.make
        CMakeFiles/cmTC_96921.dir/build
  
        make[1]: Entering directory '/cygdrive/c/Users/Lucas
        Lofaro/ClionProjects/cracking_the_coding_interview/cmake-build-debug/CMakeFiles/CMakeTmp'
  
  
        Building CXX object CMakeFiles/cmTC_96921.dir/testCXXCompiler.cxx.o
  
        /usr/bin/c++.exe -o CMakeFiles/cmTC_96921.dir/testCXXCompiler.cxx.o -c
        "/cygdrive/c/Users/Lucas
        Lofaro/ClionProjects/cracking_the_coding_interview/cmake-build-debug/CMakeFiles/CMakeTmp/testCXXCompiler.cxx"
  
  
        Linking CXX executable cmTC_96921.exe
  
        "/cygdrive/c/Users/Lucas
        Lofaro/.CLion2016.3/system/cygwin_cmake/bin/cmake.exe" -E cmake_link_script
        CMakeFiles/cmTC_96921.dir/link.txt --verbose=1
  
        /usr/bin/c++.exe -Wl,--enable-auto-import
        CMakeFiles/cmTC_96921.dir/testCXXCompiler.cxx.o -o cmTC_96921.exe
        -Wl,--out-implib,libcmTC_96921.dll.a
        -Wl,--major-image-version,0,--minor-image-version,0
  
        c++: fatal error: -fuse-linker-plugin, but cyglto_plugin.dll not found
  
        compilation terminated.
  
        CMakeFiles/cmTC_96921.dir/build.make:97: recipe for target 'cmTC_96921.exe'
        failed
  
        make[1]: *** [cmTC_96921.exe] Error 1
  
        make[1]: Leaving directory '/cygdrive/c/Users/Lucas
        Lofaro/ClionProjects/cracking_the_coding_interview/cmake-build-debug/CMakeFiles/CMakeTmp'
  
  
        Makefile:126: recipe for target 'cmTC_96921/fast' failed
  
        make: *** [cmTC_96921/fast] Error 2
  
  
  
  
  
        CMake will not be able to correctly generate this project.
      Call Stack (most recent call first):
        CMakeLists.txt:2 (project)
  
  
      -- Configuring incomplete, errors occurred!
      See also "/cygdrive/c/Users/Lucas Lofaro/ClionProjects/cracking_the_coding_interview/cmake-build-debug/CMakeFiles/CMakeOutput.log".
      See also "/cygdrive/c/Users/Lucas Lofaro/ClionProjects/cracking_the_coding_interview/cmake-build-debug/CMakeFiles/CMakeError.log".
  </code></pre>
  
  <p>I've also added the cygwin bin directory to my Path environment variable, but I am really at a loss as to what to do next. Something isn't linking up and I don't want to start digging around in Cmake files without a better understanding of what's going on. Any guidance would be much appreciated. Please let me know if I can provide any additional information.</p>