How can I link (C++) with renamed Python .lib and .dll?

When I include "Python.h" from Python 2.5 in a C++ project, it knows through some magical process that it has to link with "python25.lib" and load "python25.dll" at runtime, though I didn't specified anything neither in "Linker -> Additional Dependencies" nor in "Linker -> Additional Library Directories".

Now I would like to rename python25.lib/.dll to something like gpython25.lib/.dll and link with them. This is to be sure to link with THIS python dll and not another python25.dll from another installed application, independently from the PATH search order.

Is there a way to do that?

Thanks -David


MSVC supports this feature through pragmas:

#pragma comment(lib, "python25.lib");

More info in MSDN.

Look into Python.h file and modify the name of the linkage, if that what you want.

Need Your Help

phpmailer error "Could not instantiate mail function"

php email phpmailer

I'm using the mail() basic example modified slightly for my user id and I'm getting the error "Mailer Error: Could not instantiate mail function"

Get the eigen vector correspoinding to the ith largest eigen value

matlab for-loop pca eigenvector eigenvalue

I have tried this code for my assignments, but I am getting error of type