Reputation: 179
I were just invoking Python code in a C++ project (using VS2017). My Python version is 3.5, and I have put the paths of 'library', 'include' in the C++ project.
However, when I tried to compile the C++ code, it still shown: "The code execution cannot proceed because python35.dll was not found".
Could you please help me with this?
Thanks in advance!
I've tried to put the paths of libraries (also the path of '.dll') in the C++ project (e.g. in 'Additional Include Directories').
Upvotes: 0
Views: 1239
Reputation: 126
Exactly, because your project doesn't know where to look for it, even though you've told it it's going to use it by adding the path in Properties.
Unless stated otherwise, it will only execute what's inside the path that it uses in that project, where it keeps the source and header files.
One way to fix this is the following:
1) Head to the python .dll directory - a simple search on Start (or finder) should get you the path;
2) Copy that .dll file;
3) Paste that file into the c++ source/header file.
After saving your project, it should read the python35.dll file and you'd be good to go <3.
Upvotes: 1