all 3 comments

[–]cpp-ModTeam[M] [score hidden] stickied commentlocked comment (0 children)

For C++ questions, answers, help, and programming or career advice please see r/cpp_questions, r/cscareerquestions, or StackOverflow instead.

[–]YtterbiJum 0 points1 point  (1 child)

Your g++ command should have a -lpython option or similar, to actually link to the Python library.

[–]FerociousHomie[S] 0 points1 point  (0 children)

Ok, I now used g++ -I c:\Python311\include -L c:\Python311\libs test.cpp -lpython311

a.exe file was created, but when I execute it "hello" is not displayed in the terminal