Undefined Python references in C++ using CMake
I am trying to compile a c++ project referencing Python using CMake. I am using Cygwin and I have Python2.7 source files in Cygwin. For example: PyObject *l = PyList_New(0); Online help suggested I add the -lpython2.7 linker flag. Am I not adding this correctly in CMake? Otherwise why can I still not use the Python library and how might I fix this? The compile line: C:\cygwin64\bin\cmake.exe --build "C:\Users\...\.clion10\system\cmake\generated\3e6845d6\3e6845d6\Release" --target projectname -- -j 4 The CMakeList.txt file: cmake_minimum_required(VERSION 2.8.4) project(projectname) set(CMAKE