Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


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