On 03/02/2015 01:00 AM, Sarvagya Pant wrote:
I have been writing a c++ program that is supposed to call the python
function. The code is a snippet from python.org itself.
#include <Python.h>
#include <iostream>
#include <string>
int main()
{
Py_SetProgramName("Learning");
Py_Initialize();
PyRun_SimpleString("import hashlib\nprint hashlib.md5('sarvagya
pant').hexdigest()");
Py_Finalize();
return 0;
}
Please be more explicit about what you know and what you guess.
I have used Visual Studio 2010. I have linked the include directories and
lib files correctly. It gets correctly built.
Do you just mean that there are no errors displayed during the build?
Dependency walkerPlease be more explicit about what you know and what you guess.
shows the
file depends upon Python27.dll.
I have looked into the folder Dlls of python. It is not there.
What is not there? Your executable, or Python27.dll ? And exactly what
folder(s) are you looking?
Also I have
checked both System and System32 folder. It is not present in there too.
Python version is 2.7. How can I get Python27.dll to deploy my app for
customers? Please help.
Python27.dll does not deploy your app. Your app loads Python27.dll.
You can search for a file in Windows by doing something like:
dir /s c:\somefile.dll
at a cmd prompt. Does that find whatever file you're seeking?
When I ran Windows, I had written a simple utility that searched the
PATH for a specified file. I called it which.bat to match the Linux
equivalent.
I don't run Windows very often, but on my wife's machine I see
python27.dll in
c:\windows\syswow64
That's on a Windows7 machine running 64bit version. Location will be
different on various versions of Windows.
You can look to see where the system thinks the Python executable is
located by doing
ftype .py
and seeing what it shows. Mine shows Python.File
Then do
assoc Python.File
to see an actual path.
--
DaveA
--
https://mail.python.org/mailman/listinfo/python-list