<?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[Problem with my external on windows; saved as object, loaded as text]]></title><description><![CDATA[<p>Hey there,</p>
<p>i created two C externals pretty close to the tutorial examples from the HOW-TO. Compiling worked but PD didn't recognize the class_setup. I searched a bit and found i had to insert the line &quot;__declspec(dllexport) void classname_setup(void);&quot;. After that PD recognizes the object.<br />
The only problem left is that my external isn't properly loaded every time i open a patch containing the object. Sometimes it gets changed to a simple comment. Its saying #X text 100 100 myexternal; in the .pd file, so it seems to happen while saving. It doesn't happen every time but often enough.<br />
Is this related to the line i had to insert? I thought it just changes the way PD handles the setup routine.<br />
In the running PD environment the externals work without any problems. Only the loading issue remains.</p>
<p>I used dev c++ with mingw to compile it. I'm not familiar with compiling using a makefile. Any help is appreciated.</p>
<p>kq</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7131/problem-with-my-external-on-windows-saved-as-object-loaded-as-text</link><generator>RSS for Node</generator><lastBuildDate>Tue, 21 Apr 2026 11:43:38 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/7131.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 20 Feb 2013 09:16:44 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem with my external on windows; saved as object, loaded as text on Wed, 20 Feb 2013 09:16:44 GMT]]></title><description><![CDATA[<p>Hey there,</p>
<p>i created two C externals pretty close to the tutorial examples from the HOW-TO. Compiling worked but PD didn't recognize the class_setup. I searched a bit and found i had to insert the line &quot;__declspec(dllexport) void classname_setup(void);&quot;. After that PD recognizes the object.<br />
The only problem left is that my external isn't properly loaded every time i open a patch containing the object. Sometimes it gets changed to a simple comment. Its saying #X text 100 100 myexternal; in the .pd file, so it seems to happen while saving. It doesn't happen every time but often enough.<br />
Is this related to the line i had to insert? I thought it just changes the way PD handles the setup routine.<br />
In the running PD environment the externals work without any problems. Only the loading issue remains.</p>
<p>I used dev c++ with mingw to compile it. I'm not familiar with compiling using a makefile. Any help is appreciated.</p>
<p>kq</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7131/problem-with-my-external-on-windows-saved-as-object-loaded-as-text</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7131/problem-with-my-external-on-windows-saved-as-object-loaded-as-text</guid><dc:creator><![CDATA[kompaqt.core]]></dc:creator><pubDate>Wed, 20 Feb 2013 09:16:44 GMT</pubDate></item><item><title><![CDATA[Reply to Problem with my external on windows; saved as object, loaded as text on Wed, 20 Feb 2013 19:25:45 GMT]]></title><description><![CDATA[<p>I've looked at the source for a number of externals included in Pd-extended, and I've never seen that __declspec(dllexport) in them. I imagine there's something else going on.</p>
<p>As an aside, if you're using MinGW you should be able to use the Makefile template provided here:</p>
<p><a href="http://puredata.info/docs/developer/LibraryTemplate" rel="nofollow">http://puredata.info/docs/developer/LibraryTemplate</a></p>
<p>You only have to edit the first few lines in the file (just the files you need to include) and make sure the folder has the same name as the object. I've been using it on Linux with no troubles, and tried it once on Windows using MinGW, also worked fine.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7131/problem-with-my-external-on-windows-saved-as-object-loaded-as-text/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7131/problem-with-my-external-on-windows-saved-as-object-loaded-as-text/2</guid><dc:creator><![CDATA[Maelstorm]]></dc:creator><pubDate>Wed, 20 Feb 2013 19:25:45 GMT</pubDate></item><item><title><![CDATA[Reply to Problem with my external on windows; saved as object, loaded as text on Thu, 21 Feb 2013 00:51:52 GMT]]></title><description><![CDATA[<p>Thanks for the link to the library template. I'm new to this building process so i need some tries to get it working. Currently im getting a &quot; CreateProcess((null), uname -s, ...) failed. &quot; error. Seems to be related to some OS PATH variable, but i haven't figured out yet where i need to set it. I'm not in a rush, sooner or later i might pin it down with my configuration. This template seems to be the route to take, thanks again for pointing me in that direction!</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7131/problem-with-my-external-on-windows-saved-as-object-loaded-as-text/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7131/problem-with-my-external-on-windows-saved-as-object-loaded-as-text/3</guid><dc:creator><![CDATA[kompaqt.core]]></dc:creator><pubDate>Thu, 21 Feb 2013 00:51:52 GMT</pubDate></item><item><title><![CDATA[Reply to Problem with my external on windows; saved as object, loaded as text on Thu, 21 Feb 2013 15:58:15 GMT]]></title><description><![CDATA[<p>Hi again,</p>
<p>didn't it expect it to be so easy in the end. I'm able to compile using mingw32 commandline and the makefile you linked me to. The critical point was to set the Path variables on windows described here <a href="http://www.pronix.de/pronix-1192.html" rel="nofollow">http://www.pronix.de/pronix-1192.html</a> . Also i had to set the Path to &quot;C:\MinGW\msys\1.0\bin&quot;. Which is not in the tutorial but crutial for the makefile to work. Thats where my latest Error came from. It couldn't use the &quot;uname&quot; function in there.</p>
<p>After that i still had a problem, but it was easier to solve. In the makefile there are several compilers. In mingw is a search for the pd path with &quot;program files&quot; as the default search location. Since my pd is not located there i had to manually insert my full path info.</p>
<p>In the end it's way easier than any other method i tried. Compiling without makefile from VS 2010 ex or Dev C++, both Ide's with the makefile. But its too hard to trace the missing commandline options or missing includes.</p>
<p>So in my case for win 7 x64 i only need mingw32 from here: <a href="http://sourceforge.net/projects/mingw/?source=dlp" rel="nofollow">http://sourceforge.net/projects/mingw/?source=dlp</a> . Set all the path variables (described above). And check if your pd is in the default place (C:/Program Files/..).<br />
Finally follow the description for the makefile template and your done.<br />
Thanks again Maelstrom. I really thought i had to try a lot more ways before getting it to work properly.</p>
<p>P.S.: I found out the __declspec(dllexport) function is actually used in the m_pd.h header file itself. So its taken care of exporting the setup function, which makes life easier once again. It's a windows only thing and they also note that: /* in MSW it's ugly. /*</p>
<p>And thanks to moving this in the right place. I'm new to the forum and thought tech issues would fit in way.</p>
<p>Cheers, kompaqt.core</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7131/problem-with-my-external-on-windows-saved-as-object-loaded-as-text/4</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7131/problem-with-my-external-on-windows-saved-as-object-loaded-as-text/4</guid><dc:creator><![CDATA[kompaqt.core]]></dc:creator><pubDate>Thu, 21 Feb 2013 15:58:15 GMT</pubDate></item></channel></rss>