Microsoft Visual Studio Community 2022

  • Thread starter Thread starter ExSan
  • Start date Start date
Joined
3/21/08
Messages
593
Points
38
Microsoft Visual Studio Community 2022 / Version 17.1.1

C++:
#include "stdafx.h"
#include <Python.h>
/***********START***************/
int main(){  
    PyObject* pInt;
    Py_Initialize();
    PyRun_SimpleString("print('Hello World from Embedded Python!!!')");
    Py_Finalize();  
    return 0;

}

does anyone know how to install #include <Python.h>

Properties/path/environment ?

I have already installed Python Development Environment / Python Version Version: 3.9

my aim is to call python functions from C/C++ code
 
Last edited:
1656688034539.png

I am kind of close to make it. Now I get this error (attached image), does anyone know how to fix it?
C++:
#include <iostream>
#include <Python.h>
int main(){  
    // Initialize the Python Interpreter
    Py_Initialize();
    PyRun_SimpleString("print('Hello World from Embedded Python!!!')");
    Py_Finalize();
}
 
Last edited:
Back
Top Bottom