<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[python in c]]></title><description><![CDATA[<p>hallo,<br />
ich möchte python als modul/bibilotheck von c nutzen.<br />
d.h. in python ein paar funktionen schreiben und die dann mithilfe eines c programmes aufrufen. ich habe gehöhrt gelesen das das funzt nur wie?<br />
kleines beispiel wäre schön</p>
<p>schonmal danke</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/170467/python-in-c</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Jul 2026 07:30:01 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/170467.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 16 Jan 2007 12:21:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to python in c on Tue, 16 Jan 2007 12:21:41 GMT]]></title><description><![CDATA[<p>hallo,<br />
ich möchte python als modul/bibilotheck von c nutzen.<br />
d.h. in python ein paar funktionen schreiben und die dann mithilfe eines c programmes aufrufen. ich habe gehöhrt gelesen das das funzt nur wie?<br />
kleines beispiel wäre schön</p>
<p>schonmal danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1210707</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1210707</guid><dc:creator><![CDATA[sbleden]]></dc:creator><pubDate>Tue, 16 Jan 2007 12:21:41 GMT</pubDate></item><item><title><![CDATA[Reply to python in c on Tue, 16 Jan 2007 13:55:13 GMT]]></title><description><![CDATA[<p>Mit Python müsstest du eine Dll-Datei erzeugen. Jetzt kannst du in C die Dll laden und aus ihr Funktionen aufrufen.<br />
Komfortabler ist es aber, wenn Python gleich ne passende lib-Datei dazu erstellt.</p>
<p>a) ohne Lib:<br />
Dll mit LoadLibrary laden. Mit GetProcAddress die Funktionsaddresse aus der Dll raussuchen. Den Rückgabewert in eine Functor (Function-Pointer) deiner Wahl casten.<br />
z.B. hast du in der Dll eine Funktion &quot;int DoSth( int a, string b );&quot;, dann sieht der Functor dazu so aus: &quot;int(*DoSth)(int,char*)&quot;.</p>
<p>b) mit Lib:<br />
Den Ort der Lib-Datei deinem Compiler bekannt machen. Funktionsdeklarationen erstellen und die Funktionen daraus einfach aufrufen. Die Dll muss im selben Verzeichnis wie die Exe sein.</p>
<p>Grüße,<br />
Badestrand</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1210788</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1210788</guid><dc:creator><![CDATA[Badestrand]]></dc:creator><pubDate>Tue, 16 Jan 2007 13:55:13 GMT</pubDate></item></channel></rss>