Embeded python3.6 with MinGW in C++ fail on linking
问题 Try to embed python3.6 in C++ on Win10 64bit system. Python is installed by python-3.6.1-amd64.exe . The CMakeList.txt is showing below cmake_minimum_required(VERSION 3.8) project(EmbedPython) set(CMAKE_CXX_STANDARD 11) set(SOURCE_FILES main.cpp) find_package(PythonLibs REQUIRED) include_directories(${PYTHON_INCLUDE_DIRS}) add_executable(EmbedPython ${SOURCE_FILES} ${PYTHON_INCLUDE_DIRS}) target_link_libraries(EmbedPython ${PYTHON_LIBRARIES}) And CMake found the Python package. PYTHON_INCLUDE