Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


Distributing C++ App with Python


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 schupf   Members   -  Reputation: 216

Like
0Likes
Like

Posted 12 August 2012 - 10:10 AM

Hello,

I have written an application C++ that compiles on Windows and Linux. Now I have also written some .py Python Scripts that shall be shipped with my application.

My questions:
1) If I want to call a function from one of my Python scripts from C++ all I have to do is to do include <Python.h> and link against libPython.so (on Linux) and python27.lib on Windows. Anything else I have to do?

2) There is one thing about Python on Windows I don't understand. I have installed Python 2.7 on my Windows Machine and in the installed directory there is an "include", "libs" and "DLLs" directory. In the "libs" directory is a python27.lib and I guess I have to link against that one. But why is there no python27.dll in the DLLs directory?
I guess this .lib is an import lib, so there HAS to be a corresponding .dll, but I can't find it. Anyone knows where the python dll is?

3) If I want to ship my C++ application (that calls python code) along with the .py files: All I need to add into my distribution is the python .dll/.so and the python interpreter? Anything else I need?

Thanks for any help!

Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS