<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-3365</id>
	<title>Nabble - SWIG</title>
	<updated>2009-11-25T15:50:13Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/SWIG-f3365.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/SWIG-f3365.html" />
	<subtitle type="html">SWIG is compiler that connects C and C++ with a variety of  scripting languages including Perl, Python, Tcl, Guile, and Ruby.   People often use it to create scripting language extensions or to create interpreted environments for existing software. SWIG home is &lt;a href=&quot;http://sourceforge.net/projects/swig/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26522390</id>
	<title>Re: C structural &quot;inheritance&quot;?</title>
	<published>2009-11-25T15:50:13Z</published>
	<updated>2009-11-25T15:50:13Z</updated>
	<author>
		<name>Sean O'Rourke-2</name>
	</author>
	<content type="html">William S Fulton wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;gt; Add the following to your interface file:
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; %types(Derived = Base);
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; This will modify the runtime type system to accept a Base * where a Derived * 
&lt;br&gt;&amp;gt; is expected with a simple cast from Derived * to Base *. Hopefully that is all 
&lt;br&gt;&amp;gt; you need.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Er, correction... accept a Derived * where a Base * is expected. Sorry for 
&lt;br&gt;&amp;gt; confusion.
&lt;/div&gt;&lt;br&gt;&lt;br&gt;Thanks! &amp;nbsp;&amp;quot;%types()&amp;quot; seems like what I am looking for, but it only does half the
&lt;br&gt;job. &amp;nbsp;It does the C-level conversions, but doesn't set up the language-level
&lt;br&gt;inheritance relationships. &amp;nbsp;For example in the generated Python wrapper file, you
&lt;br&gt;still get this:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; class Derived(_object):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...
&lt;br&gt;&lt;br&gt;where you should have this:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; class Derived(Base):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...
&lt;br&gt;&lt;br&gt;I'm not sure how the current (1.3.35, anyways) behavior is useful -- is it a bug?
&lt;br&gt;Should this use of %types be documented somewhere?
&lt;br&gt;&lt;br&gt;Thanks for your help,
&lt;br&gt;Sean
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26522390&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/C-structural-%22inheritance%22--tp26401906p26522390.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26521106</id>
	<title>Re: SWIG &lt;-&gt; Ruby 1.9.1 - std::fstream	-	program	termination</title>
	<published>2009-11-25T14:03:27Z</published>
	<updated>2009-11-25T14:03:27Z</updated>
	<author>
		<name>Sören Freudiger-2</name>
	</author>
	<content type="html">Yes, the problem was that I had have to use the /MD switch unstead of /MT
&lt;br&gt;&lt;br&gt;That means it was my fault (-;
&lt;br&gt;&lt;br&gt;But this problem is still unsolved, isn't it?
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://sourceforge.net/tracker/index.php?func=detail&amp;aid=2859614&amp;group_id=16&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/tracker/index.php?func=detail&amp;aid=2859614&amp;group_id=16&lt;/a&gt;&lt;br&gt;45&amp;atid=101645
&lt;br&gt;&lt;br&gt;&lt;br&gt;-----Ursprüngliche Nachricht-----
&lt;br&gt;Von: William S Fulton [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26521106&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;wsf@...&lt;/a&gt;] 
&lt;br&gt;Gesendet: Mittwoch, 25. November 2009 19:39
&lt;br&gt;An: Sören Freudiger
&lt;br&gt;Cc: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26521106&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;swig-user@...&lt;/a&gt;
&lt;br&gt;Betreff: Re: [Swig-user] SWIG &amp;lt;-&amp;gt; Ruby 1.9.1 - std::fstream - program
&lt;br&gt;termination
&lt;br&gt;&lt;br&gt;I'd better look at these ruby-1.9.1 problems. The downloads from 
&lt;br&gt;&lt;a href=&quot;http://www.ruby-lang.org/en/downloads/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.ruby-lang.org/en/downloads/&lt;/a&gt;&amp;nbsp;require ancient versions of vc++. 
&lt;br&gt;Is there not a prebuilt visual studio 2008 version anywhere?
&lt;br&gt;&lt;br&gt;William
&lt;br&gt;Sören Freudiger wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Arghh I dont know what to do
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; No it doesnt work for 1.8.6 either (Win 2008 Server 64bit.. but ruby, 
&lt;br&gt;&amp;gt; my dll and swig are pure 32 bit).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Do I have to include some extra interface file? Do I have to add some 
&lt;br&gt;&amp;gt; special preprocessor define (in addition to NT=1 and IMPORT)?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; *Von:* Sören Freudiger [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26521106&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freud@...&lt;/a&gt;]
&lt;br&gt;&amp;gt; *Gesendet:* Donnerstag, 19. November 2009 13:37
&lt;br&gt;&amp;gt; *An:* &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26521106&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;swig-user@...&lt;/a&gt;
&lt;br&gt;&amp;gt; *Betreff:* Re: [Swig-user] SWIG &amp;lt;-&amp;gt; Ruby 1.9.1 - std::fstream - program 
&lt;br&gt;&amp;gt; termination
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Okay, here is some extra info I found out:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; It seems to be a SWIG bug.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Implementing the function direct via the ruby C-API works fine (files 
&lt;br&gt;&amp;gt; attached)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Any idea?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; (I also send an bug report to swig)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; *Von:* Sören Freudiger [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26521106&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freud@...&lt;/a&gt;]
&lt;br&gt;&amp;gt; *Gesendet:* Donnerstag, 19. November 2009 10:57
&lt;br&gt;&amp;gt; *An:* &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26521106&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;swig-user@...&lt;/a&gt;
&lt;br&gt;&amp;gt; *Betreff:* [Swig-user] SWIG &amp;lt;-&amp;gt; Ruby 1.9.1 - std::fstream - program 
&lt;br&gt;&amp;gt; termination
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hello
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Again a huge problem with ruby and C++
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Im not sure if this problem is related to SWIG or ruby. But maybe 
&lt;br&gt;&amp;gt; anyone has a clue how to fix that issue.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thats my source code:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; #include &amp;lt;iostream&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; #include &amp;lt;fstream&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; void foo()
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; {
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;std::ofstream file(&amp;quot;c:/temp/text.txt&amp;quot;, std::ios::out);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;file&amp;lt;&amp;lt;&amp;quot;hello world&amp;quot;&amp;lt;&amp;lt;std::endl;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;file.close();
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; As you can see, really crazy low level programming.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The swig interface file:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; %module example
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; %{
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; #include &amp;quot;example.h&amp;quot;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; %}
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; %include &amp;quot;example.h&amp;quot;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; And the problem:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Platform: Windows (7)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Compiler: cl from VS 2008
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Ruby version 1.8.6. everything works quite well
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Ruby version 1.9.1_p129 (installer) program termination at file.close()
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Ruby version 1.9.1_p243 (VS 2008 build, 32bit): program termination at 
&lt;br&gt;&amp;gt; file.close()
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Ruby version 1.9.2. program termination at file.close()
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I tried to debug the problem, but stuck in
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; VS9/VC/Include/fstream
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Does anyone know about that error and has a workaround?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Best,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;SirAnn
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ------------------------------------------------------------------------
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;
&lt;/div&gt;----------------------------------------------------------------------------
&lt;br&gt;--
&lt;br&gt;&amp;gt; Let Crystal Reports handle the reporting - Free Crystal Reports 2008
&lt;br&gt;30-Day 
&lt;br&gt;&amp;gt; trial. Simplify your report design, integration and deployment - and focus
&lt;br&gt;on 
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; what you do best, core application coding. Discover what's new with
&lt;br&gt;&amp;gt; Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ------------------------------------------------------------------------
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; Swig-user mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26521106&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;----------------------------------------------------------------------------
&lt;br&gt;--
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus
&lt;br&gt;on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26521106&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26521106&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/how-to-wrap-a-complex-c-strtuct-to-python-tp26421740p26521106.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26518126</id>
	<title>Re: SWIG &lt;-&gt; Ruby 1.9.1 - std::fstream -	program	termination</title>
	<published>2009-11-25T10:39:15Z</published>
	<updated>2009-11-25T10:39:15Z</updated>
	<author>
		<name>wsfulton</name>
	</author>
	<content type="html">I'd better look at these ruby-1.9.1 problems. The downloads from 
&lt;br&gt;&lt;a href=&quot;http://www.ruby-lang.org/en/downloads/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.ruby-lang.org/en/downloads/&lt;/a&gt;&amp;nbsp;require ancient versions of vc++. 
&lt;br&gt;Is there not a prebuilt visual studio 2008 version anywhere?
&lt;br&gt;&lt;br&gt;William
&lt;br&gt;Sören Freudiger wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Arghh… I don’t know what to do…
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; No it doesn’t work for 1.8.6 either (Win 2008 Server 64bit.. but ruby, 
&lt;br&gt;&amp;gt; my dll and swig are pure 32 bit).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Do I have to include some extra interface file? Do I have to add some 
&lt;br&gt;&amp;gt; special preprocessor define (in addition to NT=1 and IMPORT)?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; *Von:* Sören Freudiger [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26518126&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freud@...&lt;/a&gt;]
&lt;br&gt;&amp;gt; *Gesendet:* Donnerstag, 19. November 2009 13:37
&lt;br&gt;&amp;gt; *An:* &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26518126&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;swig-user@...&lt;/a&gt;
&lt;br&gt;&amp;gt; *Betreff:* Re: [Swig-user] SWIG &amp;lt;-&amp;gt; Ruby 1.9.1 - std::fstream - program 
&lt;br&gt;&amp;gt; termination
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Okay, here is some extra info I found out:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; It seems to be a SWIG bug.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Implementing the function direct via the ruby C-API works fine (files 
&lt;br&gt;&amp;gt; attached)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Any idea?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; (I also send an bug report to swig)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; *Von:* Sören Freudiger [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26518126&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freud@...&lt;/a&gt;]
&lt;br&gt;&amp;gt; *Gesendet:* Donnerstag, 19. November 2009 10:57
&lt;br&gt;&amp;gt; *An:* &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26518126&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;swig-user@...&lt;/a&gt;
&lt;br&gt;&amp;gt; *Betreff:* [Swig-user] SWIG &amp;lt;-&amp;gt; Ruby 1.9.1 - std::fstream - program 
&lt;br&gt;&amp;gt; termination
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hello
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Again a huge problem with ruby and C++
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I’m not sure if this problem is related to SWIG or ruby. But maybe 
&lt;br&gt;&amp;gt; anyone has a clue how to fix that issue.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; That’s’ my source code:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; #include &amp;lt;iostream&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; #include &amp;lt;fstream&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; void foo()
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; {
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;std::ofstream file(&amp;quot;c:/temp/text.txt&amp;quot;, std::ios::out);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;file&amp;lt;&amp;lt;&amp;quot;hello world&amp;quot;&amp;lt;&amp;lt;std::endl;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;file.close();
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; As you can see, really crazy low level programming.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The swig interface file:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; %module example
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; %{
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; #include &amp;quot;example.h&amp;quot;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; %}
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; %include &amp;quot;example.h&amp;quot;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; And the problem:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Platform: Windows (7)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Compiler: cl from VS 2008
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Ruby version 1.8.6. everything works quite well
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Ruby version 1.9.1_p129 (installer) program termination at file.close()
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Ruby version 1.9.1_p243 (VS 2008 build, 32bit): program termination at 
&lt;br&gt;&amp;gt; file.close()
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Ruby version 1.9.2. program termination at file.close()
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I tried to debug the problem, but stuck in
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; VS9/VC/Include/fstream
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Does anyone know about that error and has a workaround?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Best,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;SirAnn
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ------------------------------------------------------------------------
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ------------------------------------------------------------------------------
&lt;br&gt;&amp;gt; Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;&amp;gt; trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;&amp;gt; what you do best, core application coding. Discover what's new with
&lt;br&gt;&amp;gt; Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ------------------------------------------------------------------------
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; Swig-user mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26518126&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26518126&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/how-to-wrap-a-complex-c-strtuct-to-python-tp26421740p26518126.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26515414</id>
	<title>Re: pure virtual function and inheritence</title>
	<published>2009-11-25T08:03:30Z</published>
	<updated>2009-11-25T08:03:30Z</updated>
	<author>
		<name>Josh Cherry</name>
	</author>
	<content type="html">Also, note that the problem seems to be that SWIG does not see the base 
&lt;br&gt;class in which the pure virtual is declared. &amp;nbsp;You might want to fix that 
&lt;br&gt;instead; otherwise, the wrappers for derived classes may be missing 
&lt;br&gt;methods.
&lt;br&gt;&lt;br&gt;Josh
&lt;br&gt;&lt;br&gt;&lt;br&gt;On Wed, 25 Nov 2009, Juan Manuel Alvarez wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Try using:
&lt;br&gt;&amp;gt; %nodefaultctor gdcm::ImageCodec;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hope this helps!
&lt;br&gt;&amp;gt; Juan M.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Wed, Nov 25, 2009 at 10:34 AM, Mathieu Malaterre
&lt;br&gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26515414&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mathieu.malaterre@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; Hi there,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;  I am trying to wrap a class that have some virtual function. It
&lt;br&gt;&amp;gt;&amp;gt; seems swig is still trying to generate constructor for it:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; /home/mathieu/Perso/gdcm/debug-gcc/Wrapping/Csharp/gdcmCSHARP_wrap.cxx:
&lt;br&gt;&amp;gt;&amp;gt; In function ‘void* CSharp_new_ImageCodec()’:
&lt;br&gt;&amp;gt;&amp;gt; /home/mathieu/Perso/gdcm/debug-gcc/Wrapping/Csharp/gdcmCSHARP_wrap.cxx:17334:
&lt;br&gt;&amp;gt;&amp;gt; error: cannot allocate an object of abstract type ‘gdcm::ImageCodec’
&lt;br&gt;&amp;gt;&amp;gt; /home/mathieu/Perso/gdcm/trunk/Source/MediaStorageAndFileFormat/gdcmImageCodec.h:32:
&lt;br&gt;&amp;gt;&amp;gt; note:   because the following virtual functions are pure within
&lt;br&gt;&amp;gt;&amp;gt; ‘gdcm::ImageCodec’:
&lt;br&gt;&amp;gt;&amp;gt; /home/mathieu/Perso/gdcm/trunk/Source/MediaStorageAndFileFormat/gdcmCoder.h:35:
&lt;br&gt;&amp;gt;&amp;gt; note:   virtual bool gdcm::Coder::CanCode(const gdcm::TransferSyntax&amp;)
&lt;br&gt;&amp;gt;&amp;gt; const
&lt;br&gt;&amp;gt;&amp;gt; make[2]: *** [Wrapping/Csharp/CMakeFiles/gdcmsharpglue.dir/gdcmCSHARP_wrap.cxx.o]
&lt;br&gt;&amp;gt;&amp;gt; Error 1
&lt;br&gt;&amp;gt;&amp;gt; make[1]: *** [Wrapping/Csharp/CMakeFiles/gdcmsharpglue.dir/all] Error 2
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;  How I prevent from creating a cstor for class that inherits pure
&lt;br&gt;&amp;gt;&amp;gt; virtual function ?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;&amp;gt; Mathieu
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ------------------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt; Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
&lt;br&gt;&amp;gt;&amp;gt; trial. Simplify your report design, integration and deployment - and focus on
&lt;br&gt;&amp;gt;&amp;gt; what you do best, core application coding. Discover what's new with
&lt;br&gt;&amp;gt;&amp;gt; Crystal Reports now.  &lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt;&amp;gt; Swig-user mailing list
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26515414&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ------------------------------------------------------------------------------
&lt;br&gt;&amp;gt; Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
&lt;br&gt;&amp;gt; trial. Simplify your report design, integration and deployment - and focus on
&lt;br&gt;&amp;gt; what you do best, core application coding. Discover what's new with
&lt;br&gt;&amp;gt; Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; Swig-user mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26515414&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26515414&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/pure-virtual-function-and-inheritence-tp26513109p26515414.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26513450</id>
	<title>Re: pure virtual function and inheritence</title>
	<published>2009-11-25T06:17:31Z</published>
	<updated>2009-11-25T06:17:31Z</updated>
	<author>
		<name>Juan Manuel Alvarez</name>
	</author>
	<content type="html">Try using:
&lt;br&gt;%nodefaultctor gdcm::ImageCodec;
&lt;br&gt;&lt;br&gt;Hope this helps!
&lt;br&gt;Juan M.
&lt;br&gt;&lt;br&gt;On Wed, Nov 25, 2009 at 10:34 AM, Mathieu Malaterre
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26513450&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mathieu.malaterre@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi there,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;  I am trying to wrap a class that have some virtual function. It
&lt;br&gt;&amp;gt; seems swig is still trying to generate constructor for it:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; /home/mathieu/Perso/gdcm/debug-gcc/Wrapping/Csharp/gdcmCSHARP_wrap.cxx:
&lt;br&gt;&amp;gt; In function ‘void* CSharp_new_ImageCodec()’:
&lt;br&gt;&amp;gt; /home/mathieu/Perso/gdcm/debug-gcc/Wrapping/Csharp/gdcmCSHARP_wrap.cxx:17334:
&lt;br&gt;&amp;gt; error: cannot allocate an object of abstract type ‘gdcm::ImageCodec’
&lt;br&gt;&amp;gt; /home/mathieu/Perso/gdcm/trunk/Source/MediaStorageAndFileFormat/gdcmImageCodec.h:32:
&lt;br&gt;&amp;gt; note:   because the following virtual functions are pure within
&lt;br&gt;&amp;gt; ‘gdcm::ImageCodec’:
&lt;br&gt;&amp;gt; /home/mathieu/Perso/gdcm/trunk/Source/MediaStorageAndFileFormat/gdcmCoder.h:35:
&lt;br&gt;&amp;gt; note:   virtual bool gdcm::Coder::CanCode(const gdcm::TransferSyntax&amp;)
&lt;br&gt;&amp;gt; const
&lt;br&gt;&amp;gt; make[2]: *** [Wrapping/Csharp/CMakeFiles/gdcmsharpglue.dir/gdcmCSHARP_wrap.cxx.o]
&lt;br&gt;&amp;gt; Error 1
&lt;br&gt;&amp;gt; make[1]: *** [Wrapping/Csharp/CMakeFiles/gdcmsharpglue.dir/all] Error 2
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;  How I prevent from creating a cstor for class that inherits pure
&lt;br&gt;&amp;gt; virtual function ?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; Mathieu
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ------------------------------------------------------------------------------
&lt;br&gt;&amp;gt; Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
&lt;br&gt;&amp;gt; trial. Simplify your report design, integration and deployment - and focus on
&lt;br&gt;&amp;gt; what you do best, core application coding. Discover what's new with
&lt;br&gt;&amp;gt; Crystal Reports now.  &lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; Swig-user mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26513450&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26513450&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/pure-virtual-function-and-inheritence-tp26513109p26513450.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26513109</id>
	<title>pure virtual function and inheritence</title>
	<published>2009-11-25T05:34:38Z</published>
	<updated>2009-11-25T05:34:38Z</updated>
	<author>
		<name>malat</name>
	</author>
	<content type="html">Hi there,
&lt;br&gt;&lt;br&gt;&amp;nbsp; I am trying to wrap a class that have some virtual function. It
&lt;br&gt;seems swig is still trying to generate constructor for it:
&lt;br&gt;&lt;br&gt;/home/mathieu/Perso/gdcm/debug-gcc/Wrapping/Csharp/gdcmCSHARP_wrap.cxx:
&lt;br&gt;In function ‘void* CSharp_new_ImageCodec()’:
&lt;br&gt;/home/mathieu/Perso/gdcm/debug-gcc/Wrapping/Csharp/gdcmCSHARP_wrap.cxx:17334:
&lt;br&gt;error: cannot allocate an object of abstract type ‘gdcm::ImageCodec’
&lt;br&gt;/home/mathieu/Perso/gdcm/trunk/Source/MediaStorageAndFileFormat/gdcmImageCodec.h:32:
&lt;br&gt;note: &amp;nbsp; because the following virtual functions are pure within
&lt;br&gt;‘gdcm::ImageCodec’:
&lt;br&gt;/home/mathieu/Perso/gdcm/trunk/Source/MediaStorageAndFileFormat/gdcmCoder.h:35:
&lt;br&gt;note: 	virtual bool gdcm::Coder::CanCode(const gdcm::TransferSyntax&amp;)
&lt;br&gt;const
&lt;br&gt;make[2]: *** [Wrapping/Csharp/CMakeFiles/gdcmsharpglue.dir/gdcmCSHARP_wrap.cxx.o]
&lt;br&gt;Error 1
&lt;br&gt;make[1]: *** [Wrapping/Csharp/CMakeFiles/gdcmsharpglue.dir/all] Error 2
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; How I prevent from creating a cstor for class that inherits pure
&lt;br&gt;virtual function ?
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;-- 
&lt;br&gt;Mathieu
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26513109&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/pure-virtual-function-and-inheritence-tp26513109p26513109.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26506129</id>
	<title>Re: wrapping template classes which wrap stl collections</title>
	<published>2009-11-24T17:15:18Z</published>
	<updated>2009-11-24T17:15:18Z</updated>
	<author>
		<name>wsfulton</name>
	</author>
	<content type="html">Anton Lauridsen wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I thought I was pretty good at c++, but I've stumpled upon something I
&lt;br&gt;&amp;gt; don't quite understand, first a little back-ground:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I'm trying to revive the Swig bindings for the Ogre3d rendering engine,
&lt;br&gt;&amp;gt; things are progressing nicely, but, I've stumpled upon a problem:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The Ogre3D library comes with the ability to track memory allocations,
&lt;br&gt;&amp;gt; and report leaks when exiting the program, naturally I'd like to use
&lt;br&gt;&amp;gt; that feature in order to ensure that the wrappers doesn't leak.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; for stl collections, this is done by wrapping the stl collections in a
&lt;br&gt;&amp;gt; template class, I've provided a small sample here:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; //for stl containter
&lt;br&gt;&amp;gt; namespace Ogre
&lt;br&gt;&amp;gt; { 
&lt;br&gt;&amp;gt; 	template &amp;lt;typename T, typename A = STLAllocator&amp;lt;T, GeneralAllocPolicy&amp;gt;
&lt;br&gt;&amp;gt; 	struct deque 
&lt;br&gt;&amp;gt; 	{ 
&lt;br&gt;&amp;gt; #if OGRE_CONTAINERS_USE_CUSTOM_MEMORY_ALLOCATOR
&lt;br&gt;&amp;gt; 	 &amp;nbsp; typedef typename std::deque&amp;lt;T, A&amp;gt; type; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt; #else
&lt;br&gt;&amp;gt; 		typedef typename std::deque&amp;lt;T&amp;gt; type; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt; #endif
&lt;br&gt;&amp;gt; 	}; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 	template &amp;lt;typename T, typename A = STLAllocator&amp;lt;T, GeneralAllocPolicy&amp;gt;
&lt;br&gt;&amp;gt; 	struct vector 
&lt;br&gt;&amp;gt; 	{ 
&lt;br&gt;&amp;gt; #if OGRE_CONTAINERS_USE_CUSTOM_MEMORY_ALLOCATOR
&lt;br&gt;&amp;gt; 		typedef typename std::vector&amp;lt;T, A&amp;gt; type; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt; #else
&lt;br&gt;&amp;gt; 		typedef typename std::vector&amp;lt;T&amp;gt; type; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt; #endif
&lt;br&gt;&amp;gt; 	}; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 	template &amp;lt;typename T, typename A = STLAllocator&amp;lt;T, GeneralAllocPolicy&amp;gt;
&lt;br&gt;&amp;gt; 	struct list 
&lt;br&gt;&amp;gt; 	{ 
&lt;br&gt;&amp;gt; #if OGRE_CONTAINERS_USE_CUSTOM_MEMORY_ALLOCATOR
&lt;br&gt;&amp;gt; 	 &amp;nbsp; typedef typename std::list&amp;lt;T, A&amp;gt; type; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt; #else
&lt;br&gt;&amp;gt; 		typedef typename std::list&amp;lt;T&amp;gt; type; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt; #endif
&lt;br&gt;&amp;gt; 	}; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 	template &amp;lt;typename T, typename P = std::less&amp;lt;T&amp;gt;, typename A =
&lt;br&gt;&amp;gt; STLAllocator&amp;lt;T, GeneralAllocPolicy&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; 	struct set 
&lt;br&gt;&amp;gt; 	{ 
&lt;br&gt;&amp;gt; #if OGRE_CONTAINERS_USE_CUSTOM_MEMORY_ALLOCATOR
&lt;br&gt;&amp;gt; 	 &amp;nbsp; typedef typename std::set&amp;lt;T, P, A&amp;gt; type; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt; #else
&lt;br&gt;&amp;gt; 		typedef typename std::set&amp;lt;T, P&amp;gt; type; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt; #endif
&lt;br&gt;&amp;gt; 	}; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 	template &amp;lt;typename K, typename V, typename P = std::less&amp;lt;K&amp;gt;, typename A
&lt;br&gt;&amp;gt; = STLAllocator&amp;lt;std::pair&amp;lt;const K, V&amp;gt;, GeneralAllocPolicy&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; 	struct map 
&lt;br&gt;&amp;gt; 	{ 
&lt;br&gt;&amp;gt; #if OGRE_CONTAINERS_USE_CUSTOM_MEMORY_ALLOCATOR
&lt;br&gt;&amp;gt; 	 &amp;nbsp; typedef typename std::map&amp;lt;K, V, P, A&amp;gt; type; 
&lt;br&gt;&amp;gt; #else
&lt;br&gt;&amp;gt; 		typedef typename std::map&amp;lt;K, V, P&amp;gt; type; 
&lt;br&gt;&amp;gt; #endif
&lt;br&gt;&amp;gt; 	}; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 	template &amp;lt;typename K, typename V, typename P = std::less&amp;lt;K&amp;gt;, typename A
&lt;br&gt;&amp;gt; = STLAllocator&amp;lt;std::pair&amp;lt;const K, V&amp;gt;, GeneralAllocPolicy&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; 	struct multimap 
&lt;br&gt;&amp;gt; 	{ 
&lt;br&gt;&amp;gt; #if OGRE_CONTAINERS_USE_CUSTOM_MEMORY_ALLOCATOR
&lt;br&gt;&amp;gt; 		typedef typename std::multimap&amp;lt;K, V, P, A&amp;gt; type; 
&lt;br&gt;&amp;gt; #else
&lt;br&gt;&amp;gt; 		typedef typename std::multimap&amp;lt;K, V, P&amp;gt; type; 
&lt;br&gt;&amp;gt; #endif
&lt;br&gt;&amp;gt; 	}; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; } // Ogre
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The STLAllocator&amp;lt;....&amp;gt; has some defines, taking care of the different
&lt;br&gt;&amp;gt; allocation scenarios, i.e. whether &amp;nbsp;memory tracking is enabled or not.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; here comes the part which I don't really understand:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; typedef map&amp;lt;String, String&amp;gt;::type NameValuePairList;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I didn't even know that &amp;quot;::type&amp;quot; was legal c++
&lt;br&gt;&amp;gt; 
&lt;/div&gt;It is just a typedef of another type. You see this a lot in the STL, for 
&lt;br&gt;example the containers have value_type, pointer, const_reference etc.
&lt;br&gt;&lt;br&gt;&amp;gt; I tried to wrap it using:
&lt;br&gt;&amp;gt; %template(NameValuePairList) Ogre::map&amp;lt;Ogre::String,
&lt;br&gt;&amp;gt; Ogre::String&amp;gt;::type;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; but Swig doesn't like the &amp;quot;::type&amp;quot; either, if I leave it out, 
&lt;br&gt;&amp;gt; 
&lt;br&gt;The syntax for %template must match that of a template, so a typedef to 
&lt;br&gt;a template does not work. This is a limitation, but possibly this can be 
&lt;br&gt;improved in the future. So for now you have to provide the exact 
&lt;br&gt;template instantiation:
&lt;br&gt;&lt;br&gt;#if OGRE_CONTAINERS_USE_CUSTOM_MEMORY_ALLOCATOR
&lt;br&gt;&amp;nbsp; &amp;nbsp;%template(NameValuePairList) std::map&amp;lt;K, V, P, A&amp;gt;;
&lt;br&gt;#else
&lt;br&gt;&amp;nbsp; &amp;nbsp;%template(NameValuePairList) std::map&amp;lt;K, V, P&amp;gt;;
&lt;br&gt;#endif
&lt;br&gt;&lt;br&gt;or you could probably do something with the preprocessor to make this 
&lt;br&gt;less tedious for all your templates:
&lt;br&gt;&lt;br&gt;#if OGRE_CONTAINERS_USE_CUSTOM_MEMORY_ALLOCATOR
&lt;br&gt;# define OGRE_ALLOCATORS ,A
&lt;br&gt;#else
&lt;br&gt;# define OGRE_ALLOCATORS
&lt;br&gt;#endif
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;%template(NameValuePairList) std::map&amp;lt;K, V, P OGRE_ALLOCATORS &amp;gt;;
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; void f(const Ogre::NameValuePairList *p);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; gets wrapped as:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; public void
&lt;br&gt;&amp;gt; f(SWIGTYPE_p_Ogre__mapT_Ogre__String_Ogre__String_std__lessT_Ogre__String_t_STLAllocatorT_std__pairT_Ogre__String_const_Ogre__String_t_Ogre__GeneralAllocPolicy_t_t__type p)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I'd prefer the signature to be:
&lt;br&gt;&amp;gt; public void f(NameValuePairList p);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Is there a simple way to achieve this or do I need to manually define
&lt;br&gt;&amp;gt; the wrappers?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Any help would be greatly appreciated, especially this doing this
&lt;br&gt;&amp;gt; manually would be quite a daunting task, given all the places that
&lt;br&gt;&amp;gt; collections are used.
&lt;/div&gt;Hope that helps.
&lt;br&gt;&lt;br&gt;William
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26506129&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/wrapping-template-classes-which-wrap-stl-collections-tp26494151p26506129.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26505748</id>
	<title>Re: Generating C# Interfaces for Proxy Classes</title>
	<published>2009-11-24T16:35:37Z</published>
	<updated>2009-11-24T16:35:37Z</updated>
	<author>
		<name>wsfulton</name>
	</author>
	<content type="html">There was an attempt at adding a feature into SWIG to do this more 
&lt;br&gt;easily. If you search the mailing list for some posts by zhiyang jiang 
&lt;br&gt;you'll get some more info.
&lt;br&gt;&lt;br&gt;William
&lt;br&gt;&lt;br&gt;Juan Manuel Alvarez wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; As far as I know, you will have to do it by hand.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Here is an example:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; %nodefaultctor IMyInterface;
&lt;br&gt;&amp;gt; %typemap(csbase, replace=&amp;quot;1&amp;quot;) IMyInterface &amp;quot;&amp;quot;;
&lt;br&gt;&amp;gt; %typemap(csclassmodifiers) IMyInterface &amp;quot;interface&amp;quot;;
&lt;br&gt;&amp;gt; %typemap(csbody) IMyInterface &amp;quot;&amp;quot;;
&lt;br&gt;&amp;gt; %typemap(csfinalize) IMyInterface &amp;quot;&amp;quot;;
&lt;br&gt;&amp;gt; %typemap(csdestruct) IMyInterface &amp;quot;&amp;quot;;
&lt;br&gt;&amp;gt; %typemap(cscode) IMyInterface
&lt;br&gt;&amp;gt; %{
&lt;br&gt;&amp;gt; 	// interface declaration here
&lt;br&gt;&amp;gt; %}
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; %inline %{
&lt;br&gt;&amp;gt; class IMyInterface{};
&lt;br&gt;&amp;gt; %}
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Then you just have to change the base of your wrapped class like this:
&lt;br&gt;&amp;gt; %typemap(csinterfaces) MyClass &amp;quot;IMyInterface, IDisposable&amp;quot;;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hope this helps!
&lt;br&gt;&amp;gt; Juan M.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On Mon, Nov 23, 2009 at 3:44 AM, Josh Rivers &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26505748&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;josh@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; Hi All,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I've done some searching and seen mention of this previously, but I'm not
&lt;br&gt;&amp;gt;&amp;gt; clear on whether a solution was ever implemented/found.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I'd like interfaces that match my generated proxy types to be generated
&lt;br&gt;&amp;gt;&amp;gt; alongside the proxy classes (so that I can use mocking tools easily to
&lt;br&gt;&amp;gt;&amp;gt; generate mock objects). Can SWIG be cajoled into generating a matching
&lt;br&gt;&amp;gt;&amp;gt; interface for each proxy class?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt;&amp;gt; Josh
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ------------------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt; Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
&lt;br&gt;&amp;gt;&amp;gt; trial. Simplify your report design, integration and deployment - and focus
&lt;br&gt;&amp;gt;&amp;gt; on
&lt;br&gt;&amp;gt;&amp;gt; what you do best, core application coding. Discover what's new with
&lt;br&gt;&amp;gt;&amp;gt; Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt;&amp;gt; Swig-user mailing list
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26505748&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ------------------------------------------------------------------------------
&lt;br&gt;&amp;gt; Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;&amp;gt; trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;&amp;gt; what you do best, core application coding. Discover what's new with
&lt;br&gt;&amp;gt; Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; Swig-user mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26505748&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26505748&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Generating-C--Interfaces-for-Proxy-Classes-tp26473557p26505748.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26505704</id>
	<title>Re: C#: problem with dispose method when using csbase and	replace=&quot;1&quot;</title>
	<published>2009-11-24T16:26:14Z</published>
	<updated>2009-11-24T16:26:14Z</updated>
	<author>
		<name>wsfulton</name>
	</author>
	<content type="html">Anton Lauridsen wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I'm trying to redefine the base class of a wrapped class in c#, using:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; %typemap(csbase, replace=&amp;quot;1&amp;quot;) osgViewer::View &amp;quot;Osg.View&amp;quot;;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; which works great, except I'm having issues mapping the corresponding
&lt;br&gt;&amp;gt; &amp;quot;Dispose&amp;quot; methods, when replacing the base, the &amp;quot;derived&amp;quot; flag in
&lt;br&gt;&amp;gt; csharp.cxx (line 1540) is assigned &amp;quot;false&amp;quot;, which causes the code for
&lt;br&gt;&amp;gt; generating the &amp;quot;csdestruct&amp;quot; method to insert a &amp;quot;virtual&amp;quot; keyword.
&lt;br&gt;&amp;gt; Wouldn't it be better to have the &amp;quot;derived&amp;quot; flag remain true when &amp;quot;%
&lt;br&gt;&amp;gt; typemap(csbase, replace=&amp;quot;1&amp;quot;)&amp;quot; is specified, which would not remove the
&lt;br&gt;&amp;gt; issue with the inserted &amp;quot;derived&amp;quot; flag but also reduce the complexity of
&lt;br&gt;&amp;gt; specifying a new base class, since most of the &amp;quot;_derived&amp;quot; typemaps will
&lt;br&gt;&amp;gt; often match what is needed when overriding the base class. I.e.
&lt;br&gt;&amp;gt; instead of: 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ----
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; if (purebase_replace) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; wanted_base = pure_baseclass;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; derived = false;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; Delete(baseclass);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; baseclass = NULL;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (purebase_notderived)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Swig_error(input_file, line_number, &amp;quot;The csbase typemap for
&lt;br&gt;&amp;gt; proxy %s must contain just one of the 'replace' or 'notderived'
&lt;br&gt;&amp;gt; attributes.\n&amp;quot;, typemap_lookup_type);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; } else if (Len(pure_baseclass) &amp;gt; 0 &amp;&amp; Len(baseclass) &amp;gt; 0) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; Swig_warning(WARN_CSHARP_MULTIPLE_INHERITANCE, input_file,
&lt;br&gt;&amp;gt; line_number,
&lt;br&gt;&amp;gt; 		 &amp;nbsp; &amp;quot;Warning for %s proxy: Base %s ignored. Multiple inheritance is not
&lt;br&gt;&amp;gt; supported in C#. &amp;quot;
&lt;br&gt;&amp;gt; 		 &amp;nbsp; &amp;quot;Perhaps you need one of the 'replace' or 'notderived' attributes
&lt;br&gt;&amp;gt; in the csbase typemap?\n&amp;quot;, typemap_lookup_type, pure_baseclass);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; ----
&lt;br&gt;&amp;gt; use:
&lt;br&gt;&amp;gt; ----
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; if (purebase_replace) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; wanted_base = pure_baseclass;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; Delete(baseclass);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; baseclass = NULL;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (purebase_notderived)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Swig_error(input_file, line_number, &amp;quot;The csbase typemap for
&lt;br&gt;&amp;gt; proxy %s must contain just one of the 'replace' or 'notderived'
&lt;br&gt;&amp;gt; attributes.\n&amp;quot;, typemap_lookup_type);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; else
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; derived = false;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; } else if (Len(pure_baseclass) &amp;gt; 0 &amp;&amp; Len(baseclass) &amp;gt; 0) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; Swig_warning(WARN_CSHARP_MULTIPLE_INHERITANCE, input_file,
&lt;br&gt;&amp;gt; line_number,
&lt;br&gt;&amp;gt; 		 &amp;nbsp; &amp;quot;Warning for %s proxy: Base %s ignored. Multiple inheritance is not
&lt;br&gt;&amp;gt; supported in C#. &amp;quot;
&lt;br&gt;&amp;gt; 		 &amp;nbsp; &amp;quot;Perhaps you need one of the 'replace' or 'notderived' attributes
&lt;br&gt;&amp;gt; in the csbase typemap?\n&amp;quot;, typemap_lookup_type, pure_baseclass);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; ----
&lt;br&gt;&amp;gt; 
&lt;/div&gt;The only difference I can see above is that derived is set to false (as 
&lt;br&gt;before) under an error condition, so I don't get what the difference is 
&lt;br&gt;really unless there is an error condition... but then SWIG errors out, 
&lt;br&gt;so the wrappers fail. BTW, a patch generated from diff is a lot easier 
&lt;br&gt;to follow when submitting code suggestions.
&lt;br&gt;&lt;br&gt;&amp;gt; That way the typemap will still operate as if it the class was
&lt;br&gt;&amp;gt; inherited, except when the &amp;quot;notderived&amp;quot; derived flag has been specified.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;If the replace resulted in a 'override' rather than 'virtual' Dispose 
&lt;br&gt;method, then the base class class would have to implement the Dispose 
&lt;br&gt;method plus the swigCMemOwn flag. Seems more sensible to leave all this 
&lt;br&gt;kerfuffle to the SWIG generated classes. Also if you want you can remove 
&lt;br&gt;the csdestruct typemaps and put Dispose methods into the cscode typemap.
&lt;br&gt;&lt;br&gt;If I've missed something, I suggest you post a cut down use case of what 
&lt;br&gt;you want, so I can see what is c++ and what is c#.
&lt;br&gt;&lt;br&gt;William
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26505704&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/C-%3A-problem-with-dispose-method-when-using-csbase-and-replace%3D%221%22-tp26411165p26505704.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26504819</id>
	<title>Re: Passing arrays of objects between C++ and C#</title>
	<published>2009-11-24T14:54:35Z</published>
	<updated>2009-11-24T14:54:35Z</updated>
	<author>
		<name>wsfulton</name>
	</author>
	<content type="html">eodabash wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; We're currently dealing with a pretty tricky situation at my company trying
&lt;br&gt;&amp;gt; to wrap a set of C++ classes for C# with SWIG. The problems we're running
&lt;br&gt;&amp;gt; into mainly revolve around passing C++ structs or arrays of structs back and
&lt;br&gt;&amp;gt; forth between C++ and C#. 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; For example, suppose we have a simple type that looks like this in C++
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; struct Point
&lt;br&gt;&amp;gt; {
&lt;br&gt;&amp;gt; float x,y,z;
&lt;br&gt;&amp;gt; };
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; We need to be able to do the following:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; - Pass a single Point from C# to C++ 
&lt;br&gt;&amp;gt; - Pass an array of Points from C# to C++
&lt;br&gt;&amp;gt; - Pass a pointer to a single Point from C++ to C# (to a C# override of a C++
&lt;br&gt;&amp;gt; virtual function using the directors mechanism)
&lt;br&gt;&amp;gt; - Pass an array of Points from C++ to C# through a virtual function override
&lt;br&gt;&amp;gt; (as in the previous case)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I'm not sure if our approach here should be to work with a SWIG proxy
&lt;br&gt;&amp;gt; version of the Point class, since an array of these proxy objects is really
&lt;br&gt;&amp;gt; just an array of pointers to C++ objects, not an array of sequential C++
&lt;br&gt;&amp;gt; objects in memory, and for C++ to send an array of Points to C# we would
&lt;br&gt;&amp;gt; need to really initialize an array of proxy objects, assign each one to an
&lt;br&gt;&amp;gt; element in the C++ array, and then pass it on to the actual C# user code.
&lt;br&gt;&amp;gt; Then we would also have to do something similar going the other way.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The other option I thought of is to (somehow) not let SWIG define a proxy
&lt;br&gt;&amp;gt; Point class and instead define something like:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; [StructLayout(LayoutKind.Sequential)]
&lt;br&gt;&amp;gt; public struct Point
&lt;br&gt;&amp;gt; {
&lt;br&gt;&amp;gt; public float x;
&lt;br&gt;&amp;gt; public float y;
&lt;br&gt;&amp;gt; public float z;
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; And hopefully figure out a way to use this in C# so we can directly work
&lt;br&gt;&amp;gt; with C++ input objects, and directly pass a pointer to an array of these
&lt;br&gt;&amp;gt; structs from C# to C++ (rather than making copies).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; So I guess I'm wondering if there's a canonical solution to this type of
&lt;br&gt;&amp;gt; problem, or if we're in uncharted territory here, and are we maybe asking
&lt;br&gt;&amp;gt; too much of SWIG?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks in advance for any suggestions,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Evan
&lt;br&gt;&amp;gt; 
&lt;/div&gt;With regard to marshalling structs, take a look at this old thread:
&lt;br&gt;&lt;a href=&quot;http://thread.gmane.org/gmane.comp.programming.swig/11088&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://thread.gmane.org/gmane.comp.programming.swig/11088&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://thread.gmane.org/gmane.comp.programming.swig/12887&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://thread.gmane.org/gmane.comp.programming.swig/12887&lt;/a&gt;&lt;br&gt;&lt;br&gt;I'm not sure about the arrays without some thought, but SWIG really 
&lt;br&gt;ought to have some features and examples for marshalling C# structs as 
&lt;br&gt;currently there is no simple easy to use feature for this type of 
&lt;br&gt;marshalling.
&lt;br&gt;&lt;br&gt;William
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26504819&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Passing-arrays-of-objects-between-C%2B%2B-and-C--tp26292049p26504819.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26504631</id>
	<title>Re: Temporarily disable std_vector.i?</title>
	<published>2009-11-24T14:43:56Z</published>
	<updated>2009-11-24T14:43:56Z</updated>
	<author>
		<name>wsfulton</name>
	</author>
	<content type="html">&lt;br&gt;Russell Owen wrote:
&lt;br&gt;&amp;gt; Thank you very much for fixing this bug. It will be a huge help to our 
&lt;br&gt;&amp;gt; project. (I can confirm that SWIG 1.3.40 fixes the problem for me; I was 
&lt;br&gt;&amp;gt; at 1.3.36).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Could you please expand a bit on your statement: &amp;quot;Yes, it is better to 
&lt;br&gt;&amp;gt; use %template with a class type (Bar in this case) once SWIG has 
&lt;br&gt;&amp;gt; parsed.&amp;quot;? I'm not sure what you are recommending.
&lt;br&gt;&amp;gt; 
&lt;br&gt;I'm trying to say that the order of your statements is important. SWIG 
&lt;br&gt;must parse Bar before you use Bar in %template. This way SWIG knows all 
&lt;br&gt;the type information before you use the types.
&lt;br&gt;&lt;br&gt;&amp;gt; I see that the warnings about an overlaoded method is still printed, but 
&lt;br&gt;&amp;gt; I can't see anything to warn about anymore. Should I report it as a 
&lt;br&gt;&amp;gt; minor bug?
&lt;br&gt;&amp;gt; 
&lt;br&gt;The warning is there because std::vector of any type is given the same 
&lt;br&gt;precedence in the overloading ranking mechanism. Actually I don't know 
&lt;br&gt;if it is a problem or not! Try it out and see if you can get both the 
&lt;br&gt;overloaded constructors to work. Normally you get this warning when a 
&lt;br&gt;multiple C++ types have just one equivalent in the target language, eg 
&lt;br&gt;Foo*, Foo&amp;, const Foo*, const Foo&amp; etc.
&lt;br&gt;&lt;br&gt;&amp;gt; swigtest.h:24: Warning(509): Overloaded method 
&lt;br&gt;&amp;gt; test::Foo::Foo(std::vector&amp;lt; test::Bar,std::allocator&amp;lt; test::Bar &amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; const &amp;) is shadowed by test::Foo::Foo(std::vector&amp;lt; int,std::allocator&amp;lt; 
&lt;br&gt;&amp;gt; int &amp;gt; &amp;gt; const &amp;) at swigtest.h:18.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;William
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26504631&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Temporarily-disable-std_vector.i--tp26119470p26504631.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26504509</id>
	<title>Re: Temporarily disable std_vector.i?</title>
	<published>2009-11-24T14:32:22Z</published>
	<updated>2009-11-24T14:32:22Z</updated>
	<author>
		<name>Russell E. Owen-4</name>
	</author>
	<content type="html">Thank you very much for fixing this bug. It will be a huge help to our &amp;nbsp;
&lt;br&gt;project. (I can confirm that SWIG 1.3.40 fixes the problem for me; I &amp;nbsp;
&lt;br&gt;was at 1.3.36).
&lt;br&gt;&lt;br&gt;Could you please expand a bit on your statement: &amp;quot;Yes, it is better to &amp;nbsp;
&lt;br&gt;use %template with a class type (Bar in this case) once SWIG has &amp;nbsp;
&lt;br&gt;parsed.&amp;quot;? I'm not sure what you are recommending.
&lt;br&gt;&lt;br&gt;I see that the warnings about an overlaoded method is still printed, &amp;nbsp;
&lt;br&gt;but I can't see anything to warn about anymore. Should I report it as &amp;nbsp;
&lt;br&gt;a minor bug?
&lt;br&gt;&lt;br&gt;swigtest.h:24: Warning(509): Overloaded method &amp;nbsp;
&lt;br&gt;test::Foo::Foo(std::vector&amp;lt; test::Bar,std::allocator&amp;lt; test::Bar &amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;const &amp;) is shadowed by test::Foo::Foo(std::vector&amp;lt; &amp;nbsp;
&lt;br&gt;int,std::allocator&amp;lt; int &amp;gt; &amp;gt; const &amp;) at swigtest.h:18.
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- Russell
&lt;br&gt;&lt;br&gt;On Nov 24, 2009, at 1:42 PM, William S Fulton wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Russell E. Owen wrote:
&lt;br&gt;&amp;gt;&amp;gt; In article &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26504509&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;4AEDF6C0.1070902@...&lt;/a&gt;&amp;gt;,
&lt;br&gt;&amp;gt;&amp;gt; William S Fulton &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26504509&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;wsf@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; On Nov 1, 2009, at 12:59 PM, William S Fulton wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Russell E. Owen wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I am having some issues with shadowed constructors that I think &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; are caused by using std_vector.i
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Some of our classes have multiple constructors such as this:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Foo::Foo(std::vector&amp;lt;double&amp;gt; &amp;values)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Foo::Foo(std::vector&amp;lt;boost::shared_ptr&amp;lt;FancyClass&amp;gt; &amp;gt; &amp;fancyClasses)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; and our SWIG file wraps the class Foo and also wraps the &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; arguments as so:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; %template(VectorDouble) std::vector&amp;lt;double&amp;gt;;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; %template 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; (VectorFancyClass)std::vector&amp;lt;boost::shared_ptr&amp;lt;FancyClass&amp;gt; &amp;gt;;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; SWIG complains that the latter constructor is shadowed by the &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; former.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; As far as I can tell this is because both std::vector&amp;lt;double&amp;gt; and &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; std::vector&amp;lt;boost::shared_ptr&amp;lt;some fancyclass&amp;gt; &amp;gt; have been &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; templated after including std_vector.i. Thus SWIG is trying to &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; support all of the following forms of Foo constructor:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 1) an explicitly constructed VectorDouble
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 2) a python list of doubles (due to std_vector.i and much &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; appreciated)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 3) an explicitly constructed VectorFancyClass
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 4) a python list of FancyClasses (due to std_vector.i and not &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; necessary)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; and the two python list versions (2 and 4) are colliding with &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; each other.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I suspect that both Foo constructors are actually available, and &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; that only case (4) is unavailable. If so, we can live with it. &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; But I would rather explicitly disable std_vector.i for &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; VectorFancyClass if there is some easy way to do this.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I realize I could just include std_vector.i at the very end, but &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; that happens to be a headache due to the way we're including it &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; right now (in a common .i file shared by all others -- maybe that &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; is a mistake).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Anyone have any suggestions?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I don't see why SWIG is doing this and I can't replicate this &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; problem. I suggest you post a complete standalone example &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; demonstrating it...
&lt;br&gt;&amp;gt;&amp;gt; Here is my example (slightly longer than you requested, but short &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; enough, I trust, to serve)
&lt;br&gt;&amp;gt;&amp;gt; *** swigtest.h ***
&lt;br&gt;&amp;gt;&amp;gt; #include &amp;lt;iostream&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; #include &amp;lt;vector&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; namespace test {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; class Bar {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; public:
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; explicit Bar::Bar(int val=0) : intVal(val) {};
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; int intVal;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; };
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; class Foo {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; public:
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; explicit Foo::Foo(std::vector&amp;lt;int&amp;gt; const &amp;intVec) {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; std::cout &amp;lt;&amp;lt; &amp;quot;Foo(&amp;quot;;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (size_t ind = 0; ind &amp;lt; intVec.size(); ++ind)
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; std::cout &amp;lt;&amp;lt; intVec[ind] &amp;lt;&amp;lt; &amp;quot;, &amp;quot;;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; std::cout &amp;lt;&amp;lt; &amp;quot;) constructor&amp;quot; &amp;lt;&amp;lt; std::endl;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; explicit Foo::Foo(std::vector&amp;lt;Bar&amp;gt; const &amp;barVec) {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; std::cout &amp;lt;&amp;lt; &amp;quot;Foo(&amp;quot;;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (size_t ind = 0; ind &amp;lt; barVec.size(); ++ind)
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; std::cout &amp;lt;&amp;lt; &amp;quot;Bar(&amp;quot; &amp;lt;&amp;lt; barVec[ind].intVal &amp;lt;&amp;lt; &amp;quot;), &amp;quot;;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; std::cout &amp;lt;&amp;lt; &amp;quot;) constructor&amp;quot; &amp;lt;&amp;lt; std::endl;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; };
&lt;br&gt;&amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt; *** swigtest.i ***
&lt;br&gt;&amp;gt;&amp;gt; %module swigtest
&lt;br&gt;&amp;gt;&amp;gt; %{
&lt;br&gt;&amp;gt;&amp;gt; #include &amp;quot;swigtest.h&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; %}
&lt;br&gt;&amp;gt;&amp;gt; %include &amp;quot;std_vector.i&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; %template(IntVec) std::vector&amp;lt;int&amp;gt;;
&lt;br&gt;&amp;gt;&amp;gt; %template(BarVec) std::vector&amp;lt;test::Bar&amp;gt;;
&lt;br&gt;&amp;gt;&amp;gt; %include &amp;quot;swigtest.h&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; *** runtest.py ***
&lt;br&gt;&amp;gt;&amp;gt; #!/usr/bin/env python
&lt;br&gt;&amp;gt;&amp;gt; # run swigtest
&lt;br&gt;&amp;gt;&amp;gt; import swigtest
&lt;br&gt;&amp;gt;&amp;gt; # these should work
&lt;br&gt;&amp;gt;&amp;gt; iv = swigtest.IntVec()
&lt;br&gt;&amp;gt;&amp;gt; iv.append(1)
&lt;br&gt;&amp;gt;&amp;gt; iv.append(2)
&lt;br&gt;&amp;gt;&amp;gt; iv.append(3)
&lt;br&gt;&amp;gt;&amp;gt; swigtest.Foo(iv)
&lt;br&gt;&amp;gt;&amp;gt; swigtest.Foo([1, 2, 3])
&lt;br&gt;&amp;gt;&amp;gt; bv = swigtest.BarVec()
&lt;br&gt;&amp;gt;&amp;gt; bv.append(swigtest.Bar(1))
&lt;br&gt;&amp;gt;&amp;gt; bv.append(swigtest.Bar(2))
&lt;br&gt;&amp;gt;&amp;gt; bv.append(swigtest.Bar(3))
&lt;br&gt;&amp;gt;&amp;gt; swigtest.Foo(bv)
&lt;br&gt;&amp;gt;&amp;gt; swigtest.Foo([swigtest.Bar(1), swigtest.Bar(2), swigtest.Bar(3)])
&lt;br&gt;&amp;gt;&amp;gt; # this is commented out because it aborts or send Foo garbage
&lt;br&gt;&amp;gt;&amp;gt; # it may or may not be relevant to the problem being discussed
&lt;br&gt;&amp;gt;&amp;gt; # I suspect the abort or garbage is a swig bug in any case
&lt;br&gt;&amp;gt;&amp;gt; #swigtest.Foo([1, 2, swigtest.Bar(3)])
&lt;br&gt;&amp;gt;&amp;gt; #swigtest.Foo([swigtest.Bar(1), swigtest.Bar(2), 3])
&lt;br&gt;&amp;gt;&amp;gt; When I build it I get a warning about a shadowed method (see &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; appended log). But when I run the test code it works as desired.
&lt;br&gt;&amp;gt;&amp;gt; I also found that if I simply move the swigtest.i line:
&lt;br&gt;&amp;gt;&amp;gt; %template(BarVec) std::vector&amp;lt;test::Bar&amp;gt;;
&lt;br&gt;&amp;gt;&amp;gt; after the line:
&lt;br&gt;&amp;gt;&amp;gt; %include &amp;quot;swigtest.h&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; then the problem goes away (though one can no longer provide a &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; plain python list of Bar). Also it solves the problem from the &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; commented-out lines of the test code: instead of aborting or &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; sending Foo garbage, swig correctly detects the mixed type list and &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; rejects it!
&lt;br&gt;&amp;gt; Yes, it is better to use %template with a class type (Bar in this &amp;nbsp;
&lt;br&gt;&amp;gt; case) once SWIG has parsed.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I would prefer a solution that allows a plain list of Bar and &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; correctly rejects lists of mixed types. But barring such a &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; solution, simply templating the list of Bar at the end will do.
&lt;br&gt;&amp;gt; swig-1.3.37 has a fix for this problem, as per the CHANGES entry:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 2008-11-28: wsfulton
&lt;br&gt;&amp;gt; 	 &amp;nbsp; &amp;nbsp;[UTL] Fix #2080497. Some incorrect acceptance of types in the &amp;nbsp;
&lt;br&gt;&amp;gt; STL, eg a double * element
&lt;br&gt;&amp;gt; 	 &amp;nbsp; &amp;nbsp;passed into a vector&amp;lt;int *&amp;gt; constructor would be accepted, but &amp;nbsp;
&lt;br&gt;&amp;gt; the ensuing behaviour
&lt;br&gt;&amp;gt; 	 &amp;nbsp; &amp;nbsp;was undefined. Now the type conversion correctly raises an &amp;nbsp;
&lt;br&gt;&amp;gt; exception.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I tried the latest version using your commented out lines above &amp;nbsp;
&lt;br&gt;&amp;gt; passing in vectors of mixed types and get:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Foo(1, 2, 3, ) constructor
&lt;br&gt;&amp;gt; Foo(1, 2, 3, ) constructor
&lt;br&gt;&amp;gt; Foo(Bar(1), Bar(2), Bar(3), ) constructor
&lt;br&gt;&amp;gt; Foo(Bar(1), Bar(2), Bar(3), ) constructor
&lt;br&gt;&amp;gt; Traceback (most recent call last):
&lt;br&gt;&amp;gt; &amp;nbsp;File &amp;quot;./runme.py&amp;quot;, line 26, in &amp;lt;module&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;example.Foo([1, 2, example.Bar(3)])
&lt;br&gt;&amp;gt; &amp;nbsp;File &amp;quot;/home/william/swig/trunk/Examples/william/temp9/example.py&amp;quot;, &amp;nbsp;
&lt;br&gt;&amp;gt; line 217, in __init__
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;this = _example.new_Foo(*args)
&lt;br&gt;&amp;gt; NotImplementedError: Wrong number of arguments for overloaded &amp;nbsp;
&lt;br&gt;&amp;gt; function 'new_Foo'.
&lt;br&gt;&amp;gt; &amp;nbsp;Possible C/C++ prototypes are:
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;test::Foo(std::vector&amp;lt; int,std::allocator&amp;lt; int &amp;gt; &amp;gt; const &amp;)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;test::Foo(std::vector&amp;lt; test::Bar,std::allocator&amp;lt; test::Bar &amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; const &amp;)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; PS I also had to correct this problem in the constructors, but I &amp;nbsp;
&lt;br&gt;&amp;gt; don't think it will affect the SWIG output:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; g++ -c -fpic &amp;nbsp;example_wrap.cxx &amp;nbsp;example.cxx &amp;nbsp; -I/usr/include/ 
&lt;br&gt;&amp;gt; python2.5 -I/usr/lib/python2.5/config
&lt;br&gt;&amp;gt; In file included from example_wrap.cxx:2801:
&lt;br&gt;&amp;gt; swigtest.h:8: error: extra qualification ‘test::Bar::’ on member ‘Bar’
&lt;br&gt;&amp;gt; swigtest.h:14: error: extra qualification ‘test::Foo::’ on member &amp;nbsp;
&lt;br&gt;&amp;gt; ‘Foo’
&lt;br&gt;&amp;gt; swigtest.h:20: error: extra qualification ‘test::Foo::’ on member &amp;nbsp;
&lt;br&gt;&amp;gt; ‘Foo’
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26504509&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Temporarily-disable-std_vector.i--tp26119470p26504509.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26504348</id>
	<title>Re: C structural &quot;inheritance&quot;?</title>
	<published>2009-11-24T14:22:09Z</published>
	<updated>2009-11-24T14:22:09Z</updated>
	<author>
		<name>wsfulton</name>
	</author>
	<content type="html">William S Fulton wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Sean wrote:
&lt;br&gt;&amp;gt;&amp;gt; I'm wrapping some code that mimics inheritance with C structs via 
&lt;br&gt;&amp;gt;&amp;gt; structural inheritance, e.g.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; struct Base {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; int x;
&lt;br&gt;&amp;gt;&amp;gt; };
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; struct Derived {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; int x;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; int y;
&lt;br&gt;&amp;gt;&amp;gt; };
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I would like to tell SWIG to treat Derived as a subclass of Base. &amp;nbsp;My 
&lt;br&gt;&amp;gt;&amp;gt; current solution is to post-process SWIG output to (1) add appropriate 
&lt;br&gt;&amp;gt;&amp;gt; entries to the swig_cast_info for the base type, and (2) create 
&lt;br&gt;&amp;gt;&amp;gt; inheritance relationships between the scripting language wrapper 
&lt;br&gt;&amp;gt;&amp;gt; classes (e.g. add an entry to @ISA in Perl). &amp;nbsp;This seems gross and 
&lt;br&gt;&amp;gt;&amp;gt; fragile, though; does anyone here know a better way?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Add the following to your interface file:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; %types(Derived = Base);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; This will modify the runtime type system to accept a Base * where a 
&lt;br&gt;&amp;gt; Derived * is expected with a simple cast from Derived * to Base *. 
&lt;br&gt;&amp;gt; Hopefully that is all you need.
&lt;/div&gt;&lt;br&gt;Er, correction... accept a Derived * where a Base * is expected. Sorry 
&lt;br&gt;for confusion.
&lt;br&gt;&lt;br&gt;William
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26504348&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/C-structural-%22inheritance%22--tp26401906p26504348.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26504286</id>
	<title>Re: C structural &quot;inheritance&quot;?</title>
	<published>2009-11-24T14:15:20Z</published>
	<updated>2009-11-24T14:15:20Z</updated>
	<author>
		<name>wsfulton</name>
	</author>
	<content type="html">Sean wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I'm wrapping some code that mimics inheritance with C structs via structural inheritance, e.g.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; struct Base {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; int x;
&lt;br&gt;&amp;gt; };
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; struct Derived {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; int x;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; int y;
&lt;br&gt;&amp;gt; };
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I would like to tell SWIG to treat Derived as a subclass of Base. &amp;nbsp;My current solution is to post-process SWIG output to (1) add appropriate entries to the swig_cast_info for the base type, and (2) create inheritance relationships between the scripting language wrapper classes (e.g. add an entry to @ISA in Perl). &amp;nbsp;This seems gross and fragile, though; does anyone here know a better way?
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;Add the following to your interface file:
&lt;br&gt;&lt;br&gt;%types(Derived = Base);
&lt;br&gt;&lt;br&gt;This will modify the runtime type system to accept a Base * where a 
&lt;br&gt;Derived * is expected with a simple cast from Derived * to Base *. 
&lt;br&gt;Hopefully that is all you need.
&lt;br&gt;&lt;br&gt;William
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26504286&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/C-structural-%22inheritance%22--tp26401906p26504286.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26503848</id>
	<title>Re: Problems with shared_ptr and Python</title>
	<published>2009-11-24T13:43:06Z</published>
	<updated>2009-11-24T13:43:06Z</updated>
	<author>
		<name>wsfulton</name>
	</author>
	<content type="html">You have three problems with your interface file. Here is the corrected 
&lt;br&gt;version which works:
&lt;br&gt;&lt;br&gt;%include &amp;quot;boost_shared_ptr.i&amp;quot;
&lt;br&gt;SWIG_SHARED_PTR(Foo, Foo)
&lt;br&gt;&lt;br&gt;%inline %{
&lt;br&gt;#include &amp;lt;boost/shared_ptr.hpp&amp;gt;
&lt;br&gt;struct Foo {};
&lt;br&gt;void test1(boost::shared_ptr&amp;lt;Foo&amp;gt; f) {}
&lt;br&gt;void test2(boost::shared_ptr&amp;lt;Foo&amp;gt; f) {}
&lt;br&gt;%}
&lt;br&gt;&lt;br&gt;William
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26503848&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;andreas.held@...&lt;/a&gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi William
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; This is my interface file boost_example.i:
&lt;br&gt;&amp;gt; %module example
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; // For plain classes, do not use for derived classes
&lt;br&gt;&amp;gt; %include &amp;quot;boost_shared_ptr.i&amp;quot;
&lt;br&gt;&amp;gt; MY_SWIG_SHARED_PTR(Foo, Foo)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; struct Foo {};
&lt;br&gt;&amp;gt; void test1(shared_ptr&amp;lt;Foo&amp;gt; f) {}
&lt;br&gt;&amp;gt; void test2(boost::shared_ptr&amp;lt;Foo&amp;gt; f) {}
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -----------------------------------------------------------
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; My command line:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; $ swig -c++ -python boost_example.i 
&lt;br&gt;&amp;gt; boost_example.i(6): Error: Syntax error in input(1).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I do get the same results whether I run the command from a MSYS shell or from the Windows Power Shell, obviously, both on Windows (XP to be accurate).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Finally, the version I am using:
&lt;br&gt;&amp;gt; $ swig -version
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; SWIG Version 1.3.40
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Compiled with i586-mingw32msvc-g++ [i686-pc-linux-gnu]
&lt;br&gt;&amp;gt; Please see &lt;a href=&quot;http://www.swig.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.swig.org&lt;/a&gt;&amp;nbsp;for reporting bugs and further information
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Best regards and thanks for your help.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Andreas
&lt;br&gt;&amp;gt; ---- William S Fulton &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26503848&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;wsf@...&lt;/a&gt;&amp;gt; schrieb:
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26503848&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;andreas.held@...&lt;/a&gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Hi William
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Thank you for your quick reply. Sorry for my mistake in the command line. As you pointed out, the correct command line should be:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; swig -c++ -python example.i
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Still, even with that command line I do get the same error. I now stronly suspect that something is wrong with my boost installation. 
&lt;br&gt;&amp;gt;&amp;gt; It is impossible for SWIG to be affected by your boost installation 
&lt;br&gt;&amp;gt;&amp;gt; unless you tell it to via an include path (the -I option). However, 
&lt;br&gt;&amp;gt;&amp;gt; there might be a problem when your c++ compiler compiles the generated 
&lt;br&gt;&amp;gt;&amp;gt; code, as that will then use your boost installation.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Anyway, I have now found a way around my problem by using
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; %template
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I don't know what you are doing wrong, but the SWIG_SHARED_PTR macro 
&lt;br&gt;&amp;gt;&amp;gt; invokes the %template directive for you. I think you need to post your 
&lt;br&gt;&amp;gt;&amp;gt; non-working example again.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; William
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26503848&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problems-with-shared_ptr-and-Python-tp26112643p26503848.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26503832</id>
	<title>Re: Temporarily disable std_vector.i?</title>
	<published>2009-11-24T13:42:39Z</published>
	<updated>2009-11-24T13:42:39Z</updated>
	<author>
		<name>wsfulton</name>
	</author>
	<content type="html">Russell E. Owen wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; In article &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26503832&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;4AEDF6C0.1070902@...&lt;/a&gt;&amp;gt;,
&lt;br&gt;&amp;gt; &amp;nbsp;William S Fulton &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26503832&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;wsf@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On Nov 1, 2009, at 12:59 PM, William S Fulton wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; Russell E. Owen wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I am having some issues with shadowed constructors that I think are caused 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; by 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; using std_vector.i
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Some of our classes have multiple constructors such as this:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Foo::Foo(std::vector&amp;lt;double&amp;gt; &amp;values)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Foo::Foo(std::vector&amp;lt;boost::shared_ptr&amp;lt;FancyClass&amp;gt; &amp;gt; &amp;fancyClasses)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; and our SWIG file wraps the class Foo and also wraps the arguments as so:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; %template(VectorDouble) std::vector&amp;lt;double&amp;gt;;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; %template(VectorFancyClass)std::vector&amp;lt;boost::shared_ptr&amp;lt;FancyClass&amp;gt; &amp;gt;;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; SWIG complains that the latter constructor is shadowed by the former.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; As far as I can tell this is because both std::vector&amp;lt;double&amp;gt; and 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; std::vector&amp;lt;boost::shared_ptr&amp;lt;some fancyclass&amp;gt; &amp;gt; have been templated after 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; including std_vector.i. Thus SWIG is trying to support all of the following 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; forms of Foo constructor:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 1) an explicitly constructed VectorDouble
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 2) a python list of doubles (due to std_vector.i and much appreciated)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 3) an explicitly constructed VectorFancyClass
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 4) a python list of FancyClasses (due to std_vector.i and not necessary)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; and the two python list versions (2 and 4) are colliding with each other.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I suspect that both Foo constructors are actually available, and that only 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; case (4) is unavailable. If so, we can live with it. But I would rather 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; explicitly disable std_vector.i for VectorFancyClass if there is some easy 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; way to do this.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I realize I could just include std_vector.i at the very end, but that 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; happens 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; to be a headache due to the way we're including it right now (in a common 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; .i 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; file shared by all others -- maybe that is a mistake).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Anyone have any suggestions?
&lt;br&gt;&amp;gt;&amp;gt; I don't see why SWIG is doing this and I can't replicate this problem. I 
&lt;br&gt;&amp;gt;&amp;gt; suggest you post a complete standalone example demonstrating it...
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Here is my example (slightly longer than you requested, but short 
&lt;br&gt;&amp;gt; enough, I trust, to serve)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; *** swigtest.h ***
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; #include &amp;lt;iostream&amp;gt;
&lt;br&gt;&amp;gt; #include &amp;lt;vector&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; namespace test {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;class Bar {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;public:
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;explicit Bar::Bar(int val=0) : intVal(val) {};
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int intVal;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;};
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;class Foo {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;public:
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;explicit Foo::Foo(std::vector&amp;lt;int&amp;gt; const &amp;intVec) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;std::cout &amp;lt;&amp;lt; &amp;quot;Foo(&amp;quot;;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for (size_t ind = 0; ind &amp;lt; intVec.size(); ++ind)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;std::cout &amp;lt;&amp;lt; intVec[ind] &amp;lt;&amp;lt; &amp;quot;, &amp;quot;;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;std::cout &amp;lt;&amp;lt; &amp;quot;) constructor&amp;quot; &amp;lt;&amp;lt; std::endl;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;explicit Foo::Foo(std::vector&amp;lt;Bar&amp;gt; const &amp;barVec) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;std::cout &amp;lt;&amp;lt; &amp;quot;Foo(&amp;quot;;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for (size_t ind = 0; ind &amp;lt; barVec.size(); ++ind)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;std::cout &amp;lt;&amp;lt; &amp;quot;Bar(&amp;quot; &amp;lt;&amp;lt; barVec[ind].intVal &amp;lt;&amp;lt; &amp;quot;), &amp;quot;;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;std::cout &amp;lt;&amp;lt; &amp;quot;) constructor&amp;quot; &amp;lt;&amp;lt; std::endl;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;};
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; *** swigtest.i ***
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; %module swigtest
&lt;br&gt;&amp;gt; %{
&lt;br&gt;&amp;gt; #include &amp;quot;swigtest.h&amp;quot;
&lt;br&gt;&amp;gt; %}
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; %include &amp;quot;std_vector.i&amp;quot;
&lt;br&gt;&amp;gt; %template(IntVec) std::vector&amp;lt;int&amp;gt;;
&lt;br&gt;&amp;gt; %template(BarVec) std::vector&amp;lt;test::Bar&amp;gt;;
&lt;br&gt;&amp;gt; %include &amp;quot;swigtest.h&amp;quot;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; *** runtest.py ***
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; #!/usr/bin/env python
&lt;br&gt;&amp;gt; # run swigtest
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; import swigtest
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; # these should work
&lt;br&gt;&amp;gt; iv = swigtest.IntVec()
&lt;br&gt;&amp;gt; iv.append(1)
&lt;br&gt;&amp;gt; iv.append(2)
&lt;br&gt;&amp;gt; iv.append(3)
&lt;br&gt;&amp;gt; swigtest.Foo(iv)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; swigtest.Foo([1, 2, 3])
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; bv = swigtest.BarVec()
&lt;br&gt;&amp;gt; bv.append(swigtest.Bar(1))
&lt;br&gt;&amp;gt; bv.append(swigtest.Bar(2))
&lt;br&gt;&amp;gt; bv.append(swigtest.Bar(3))
&lt;br&gt;&amp;gt; swigtest.Foo(bv)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; swigtest.Foo([swigtest.Bar(1), swigtest.Bar(2), swigtest.Bar(3)])
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; # this is commented out because it aborts or send Foo garbage
&lt;br&gt;&amp;gt; # it may or may not be relevant to the problem being discussed
&lt;br&gt;&amp;gt; # I suspect the abort or garbage is a swig bug in any case
&lt;br&gt;&amp;gt; #swigtest.Foo([1, 2, swigtest.Bar(3)])
&lt;br&gt;&amp;gt; #swigtest.Foo([swigtest.Bar(1), swigtest.Bar(2), 3])
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; When I build it I get a warning about a shadowed method (see appended 
&lt;br&gt;&amp;gt; log). But when I run the test code it works as desired.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I also found that if I simply move the swigtest.i line:
&lt;br&gt;&amp;gt; %template(BarVec) std::vector&amp;lt;test::Bar&amp;gt;;
&lt;br&gt;&amp;gt; after the line:
&lt;br&gt;&amp;gt; %include &amp;quot;swigtest.h&amp;quot;
&lt;br&gt;&amp;gt; then the problem goes away (though one can no longer provide a plain 
&lt;br&gt;&amp;gt; python list of Bar). Also it solves the problem from the commented-out 
&lt;br&gt;&amp;gt; lines of the test code: instead of aborting or sending Foo garbage, swig 
&lt;br&gt;&amp;gt; correctly detects the mixed type list and rejects it!
&lt;br&gt;&amp;gt; 
&lt;/div&gt;Yes, it is better to use %template with a class type (Bar in this case) 
&lt;br&gt;once SWIG has parsed.
&lt;br&gt;&lt;br&gt;&amp;gt; I would prefer a solution that allows a plain list of Bar and correctly 
&lt;br&gt;&amp;gt; rejects lists of mixed types. But barring such a solution, simply 
&lt;br&gt;&amp;gt; templating the list of Bar at the end will do.
&lt;br&gt;&amp;gt; 
&lt;br&gt;swig-1.3.37 has a fix for this problem, as per the CHANGES entry:
&lt;br&gt;&lt;br&gt;2008-11-28: wsfulton
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [UTL] Fix #2080497. Some incorrect acceptance of types in the STL, 
&lt;br&gt;eg a double * element
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; passed into a vector&amp;lt;int *&amp;gt; constructor would be accepted, but the 
&lt;br&gt;ensuing behaviour
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; was undefined. Now the type conversion correctly raises an exception.
&lt;br&gt;&lt;br&gt;I tried the latest version using your commented out lines above passing 
&lt;br&gt;in vectors of mixed types and get:
&lt;br&gt;&lt;br&gt;Foo(1, 2, 3, ) constructor
&lt;br&gt;Foo(1, 2, 3, ) constructor
&lt;br&gt;Foo(Bar(1), Bar(2), Bar(3), ) constructor
&lt;br&gt;Foo(Bar(1), Bar(2), Bar(3), ) constructor
&lt;br&gt;Traceback (most recent call last):
&lt;br&gt;&amp;nbsp; &amp;nbsp;File &amp;quot;./runme.py&amp;quot;, line 26, in &amp;lt;module&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;example.Foo([1, 2, example.Bar(3)])
&lt;br&gt;&amp;nbsp; &amp;nbsp;File &amp;quot;/home/william/swig/trunk/Examples/william/temp9/example.py&amp;quot;, 
&lt;br&gt;line 217, in __init__
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;this = _example.new_Foo(*args)
&lt;br&gt;NotImplementedError: Wrong number of arguments for overloaded function 
&lt;br&gt;'new_Foo'.
&lt;br&gt;&amp;nbsp; &amp;nbsp;Possible C/C++ prototypes are:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;test::Foo(std::vector&amp;lt; int,std::allocator&amp;lt; int &amp;gt; &amp;gt; const &amp;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;test::Foo(std::vector&amp;lt; test::Bar,std::allocator&amp;lt; test::Bar &amp;gt; &amp;gt; const &amp;)
&lt;br&gt;&lt;br&gt;&lt;br&gt;PS I also had to correct this problem in the constructors, but I don't 
&lt;br&gt;think it will affect the SWIG output:
&lt;br&gt;&lt;br&gt;g++ -c -fpic &amp;nbsp;example_wrap.cxx &amp;nbsp;example.cxx &amp;nbsp; -I/usr/include/python2.5 
&lt;br&gt;-I/usr/lib/python2.5/config
&lt;br&gt;In file included from example_wrap.cxx:2801:
&lt;br&gt;swigtest.h:8: error: extra qualification ‘test::Bar::’ on member ‘Bar’
&lt;br&gt;swigtest.h:14: error: extra qualification ‘test::Foo::’ on member ‘Foo’
&lt;br&gt;swigtest.h:20: error: extra qualification ‘test::Foo::’ on member ‘Foo’
&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26503832&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Temporarily-disable-std_vector.i--tp26119470p26503832.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26503828</id>
	<title>Re: SWIG &amp; Tcl: %newobject ignored?</title>
	<published>2009-11-24T13:42:33Z</published>
	<updated>2009-11-24T13:42:33Z</updated>
	<author>
		<name>wsfulton</name>
	</author>
	<content type="html">Georgios Petasis wrote:
&lt;br&gt;&amp;gt; Hi all,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; For some reason swig 1.3.41 seems to ignore the &amp;quot;%newbject foo;&amp;quot; feature 
&lt;br&gt;&amp;gt; (and its equivalent %feature(&amp;quot;new&amp;quot;, &amp;quot;1&amp;quot;) foo;), which seems strange. 
&lt;br&gt;&amp;gt; This is because I looked insto Source/Modules/tcl8.cxx and the code 
&lt;br&gt;&amp;gt; seems to check the &amp;quot;wrap:new&amp;quot; feature, and act accordingly. The code in 
&lt;br&gt;&amp;gt; tcl8.cxx seems ok, why I don't see the results in the produced wrapper?
&lt;br&gt;&amp;gt; 
&lt;br&gt;The appropriate typemaps need a $owner. Below is a diff which provides 
&lt;br&gt;what should be needed. However, the SWIG test-suite fails with this and 
&lt;br&gt;we have no tcl maintainer at the moment, so I'd rather leave this 
&lt;br&gt;leaking memory rather than crashing. If you have any tcl knowledge, 
&lt;br&gt;please give us a hand in debugging the two runtime test crashes then we 
&lt;br&gt;can add the $owner back in.
&lt;br&gt;&lt;br&gt;William
&lt;br&gt;&lt;br&gt;william@caracal:~/swig/trunk$ svn diff Lib/tcl/
&lt;br&gt;Index: Lib/tcl/tcltypemaps.swg
&lt;br&gt;===================================================================
&lt;br&gt;--- Lib/tcl/tcltypemaps.swg	(revision 11750)
&lt;br&gt;+++ Lib/tcl/tcltypemaps.swg	(working copy)
&lt;br&gt;@@ -67,18 +67,18 @@
&lt;br&gt;&amp;nbsp; #if 1
&lt;br&gt;&amp;nbsp; // Old 1.3.25 typemaps needed to avoid premature object deletion
&lt;br&gt;&amp;nbsp; %typemap(out,noblock=1) SWIGTYPE *INSTANCE, SWIGTYPE &amp;INSTANCE, 
&lt;br&gt;SWIGTYPE INSTANCE[] {
&lt;br&gt;- &amp;nbsp;Tcl_SetObjResult(interp, SWIG_NewInstanceObj( %as_voidptr($1), 
&lt;br&gt;$1_descriptor,0));
&lt;br&gt;+ &amp;nbsp;Tcl_SetObjResult(interp, SWIG_NewInstanceObj( %as_voidptr($1), 
&lt;br&gt;$1_descriptor, $owner));
&lt;br&gt;&amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; %typemap(out) SWIGTYPE *DYNAMIC, SWIGTYPE &amp;DYNAMIC {
&lt;br&gt;&amp;nbsp; &amp;nbsp; swig_type_info *ty = 
&lt;br&gt;SWIG_TypeDynamicCast($1_descriptor,%as_voidptrptr(&amp;$1));
&lt;br&gt;- &amp;nbsp;Tcl_SetObjResult(interp,SWIG_NewInstanceObj(%as_voidptr($1), ty,0));
&lt;br&gt;+ &amp;nbsp;Tcl_SetObjResult(interp,SWIG_NewInstanceObj(%as_voidptr($1), ty, 
&lt;br&gt;$owner));
&lt;br&gt;&amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; #endif
&lt;br&gt;&lt;br&gt;&amp;nbsp; %typemap(throws,noblock=1) SWIGTYPE CLASS {
&lt;br&gt;- &amp;nbsp;SWIG_set_result(SWIG_NewInstanceObj(%as_voidptr(SWIG_new_copy($1, 
&lt;br&gt;$1_ltype)), $&amp;1_descriptor, 1));
&lt;br&gt;+ &amp;nbsp;SWIG_set_result(SWIG_NewInstanceObj(%as_voidptr(SWIG_new_copy($1, 
&lt;br&gt;$1_ltype)), $&amp;1_descriptor, SWIG_POINTER_OWN));
&lt;br&gt;&amp;nbsp; &amp;nbsp; SWIG_fail;
&lt;br&gt;&amp;nbsp; }
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26503828&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/SWIG---Tcl%3A--newobject-ignored--tp26202842p26503828.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26503830</id>
	<title>Re: Can this be done with SWIG? - [BUG in Tcl	generator?]</title>
	<published>2009-11-24T13:42:25Z</published>
	<updated>2009-11-24T13:42:25Z</updated>
	<author>
		<name>wsfulton</name>
	</author>
	<content type="html">Georgios Petasis wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; O/H Georgios Petasis έγραψε:
&lt;br&gt;&amp;gt;&amp;gt; Hi all,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I have a simple class:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; %nodefaultctor nsIDOMHTMLCollection;
&lt;br&gt;&amp;gt;&amp;gt; %nodefaultdtor nsIDOMHTMLCollection;
&lt;br&gt;&amp;gt;&amp;gt; class nsIDOMHTMLCollection {
&lt;br&gt;&amp;gt;&amp;gt; public:
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;void Release &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(void);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;void Item &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (PRUint32 index, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;nsIDOMNode **OUTPUT);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;void NamedItem &amp;nbsp; &amp;nbsp;(const nsAString &amp;name, nsIDOMNode **OUTPUT);
&lt;br&gt;&amp;gt;&amp;gt; }; /* nsIDOMHTMLCollection */
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; %nodefaultdtor nsIDOMNode;
&lt;br&gt;&amp;gt;&amp;gt; class nsIDOMNode {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;void Release(void);
&lt;br&gt;&amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; What I want to do:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 1) Tell SWIG that the arguments &amp;quot;nsIDOMNode **OUTPUT&amp;quot; are actually the 
&lt;br&gt;&amp;gt;&amp;gt; return values of the methods Item &amp; NamedItem, and that the returned 
&lt;br&gt;&amp;gt;&amp;gt; value is actually a new allocated pointer. I can do this with the 
&lt;br&gt;&amp;gt;&amp;gt; following:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; %typemap(in, numinputs=0) &amp;nbsp;nsIDOMNode **OUTPUT(nsIDOMNode *temp) {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; $1 = &amp;temp;
&lt;br&gt;&amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt; %typemap(argout) nsIDOMNode **OUTPUT {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;Tcl_SetObjResult(interp, SWIG_NewInstanceObj(
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SWIG_as_voidptr(*($1)), SWIGTYPE_p_nsIDOMNode, 1));
&lt;br&gt;&amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt; %newobject nsIDOMHTMLCollection::Item;
&lt;br&gt;&amp;gt;&amp;gt; %newobject nsIDOMHTMLCollection::NamedItem;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 2) I want to tell SWIG to delete nsIDOMNode * by calling Release(). 
&lt;br&gt;&amp;gt;&amp;gt; How can I do this?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; If I enable the default destructor, swig always uses delete on the 
&lt;br&gt;&amp;gt;&amp;gt; object. How can I change that, and actually call Release() ?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; George
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Is it possible the Tcl wrapper generator to have a bug?
&lt;br&gt;&amp;gt; I tried the following:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; %nodefaultctor nsIDOMHTMLCollection;
&lt;br&gt;&amp;gt; %feature(&amp;quot;action&amp;quot;) nsIDOMHTMLCollection::~nsIDOMHTMLCollection {
&lt;br&gt;&amp;gt; &amp;nbsp; arg1-&amp;gt;MyRelease();
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt; class nsIDOMHTMLCollection {
&lt;br&gt;&amp;gt; public:
&lt;br&gt;&amp;gt; &amp;nbsp; nref AddRef &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (void);
&lt;br&gt;&amp;gt; &amp;nbsp; nref Release &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(void);
&lt;br&gt;&amp;gt; &amp;nbsp; void Item &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (PRUint32 index, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;nsIDOMNode **OUTPUT);
&lt;br&gt;&amp;gt; &amp;nbsp; void NamedItem &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(const nsAString &amp;name, nsIDOMNode **OUTPUT);
&lt;br&gt;&amp;gt; &amp;nbsp; void GetLength &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(PRUint32 *OUTPUT);
&lt;br&gt;&amp;gt; }; /* nsIDOMHTMLCollection */
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The wrapper was generated just fine (i.e. 
&lt;br&gt;&amp;gt; _wrap_delete_nsIDOMHTMLCollection calls MyRelease()),
&lt;br&gt;&amp;gt; but the class destructor is still:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; SWIGINTERN void swig_delete_nsIDOMHTMLCollection(void *obj) {
&lt;br&gt;&amp;gt; nsIDOMHTMLCollection *arg1 = (nsIDOMHTMLCollection *) obj;
&lt;br&gt;&amp;gt; delete arg1;
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Is this what I am supposed to get?
&lt;/div&gt;&lt;br&gt;The action code appears in:
&lt;br&gt;&lt;br&gt;SWIGINTERN int
&lt;br&gt;_wrap_delete_nsIDOMHTMLCollection(ClientData clientData SWIGUNUSED, 
&lt;br&gt;Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
&lt;br&gt;&amp;nbsp; &amp;nbsp;nsIDOMHTMLCollection *arg1 = (nsIDOMHTMLCollection *) 0 ;
&lt;br&gt;&amp;nbsp; &amp;nbsp;void *argp1 = 0 ;
&lt;br&gt;&amp;nbsp; &amp;nbsp;int res1 = 0 ;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;if (SWIG_GetArgs(interp, objc, objv,&amp;quot;o:delete_nsIDOMHTMLCollection 
&lt;br&gt;self &amp;quot;,(void *)0) == TCL_ERROR) SWIG_fail;
&lt;br&gt;&amp;nbsp; &amp;nbsp;res1 = SWIG_ConvertPtr(objv[1], 
&lt;br&gt;&amp;argp1,SWIGTYPE_p_nsIDOMHTMLCollection, SWIG_POINTER_DISOWN | &amp;nbsp;0 );
&lt;br&gt;&amp;nbsp; &amp;nbsp;if (!SWIG_IsOK(res1)) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;SWIG_exception_fail(SWIG_ArgError(res1), &amp;quot;in method '&amp;quot; 
&lt;br&gt;&amp;quot;delete_nsIDOMHTMLCollection&amp;quot; &amp;quot;', argument &amp;quot; &amp;quot;1&amp;quot;&amp;quot; of type '&amp;quot; 
&lt;br&gt;&amp;quot;nsIDOMHTMLCollection *&amp;quot;&amp;quot;'&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp; &amp;nbsp;arg1 = reinterpret_cast&amp;lt; nsIDOMHTMLCollection * &amp;gt;(argp1);
&lt;br&gt;&amp;nbsp; &amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;arg1-&amp;gt;MyRelease();
&lt;br&gt;&amp;nbsp; &amp;nbsp;}
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;return TCL_OK;
&lt;br&gt;fail:
&lt;br&gt;&amp;nbsp; &amp;nbsp;return TCL_ERROR;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;Which is where it should appear... the destructor wrapper. I'm not 
&lt;br&gt;familiar with the tcl module / C API, so I don't really know why there 
&lt;br&gt;is a swig_delete_nsIDOMHTMLCollection in addition to the 
&lt;br&gt;_wrap_delete_nsIDOMHTMLCollection.
&lt;br&gt;&lt;br&gt;William
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26503830&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Can-this-be-done-with-SWIG--tp26188870p26503830.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26498342</id>
	<title>Swig : Objective C : C++ : Wrapper Behavior</title>
	<published>2009-11-24T07:47:12Z</published>
	<updated>2009-11-24T07:47:12Z</updated>
	<author>
		<name>Gregory Sogorka</name>
	</author>
	<content type="html">Hello All,&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I&amp;#39;m new to the list and the SWIG software in general, but I&amp;#39;m considering the following scenario for a SWIG implementation and curious as to whether anyone has done something similar before. A simplified example of the architecture would consist of the following :&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Objective C Layer &lt;/div&gt;&lt;div&gt;------------------------------&lt;/div&gt;&lt;div&gt;       C++ Layer &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt; ClassA     ClassB&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;
&lt;br&gt;&lt;/div&gt;&lt;div&gt;Both ClassA and ClassB will be run through SWIG in order to generate wrappers that expose their methods to the Objective-C layer. ClassA exposes a getter method that returns a pointer to ClassB.  What curious about is this pointer. Will the generated SWIG code automatically wrap the pointer in the appropriate ClassB wrapper code when the Objective C layer calls the getter method ?&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Any thoughts, ideas, or information regarding this proposal would be appreciated. &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Thanks!&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Gregory.  &lt;/div&gt;
&lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26498342&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Swig-%3A-Objective-C-%3A-C%2B%2B-%3A-Wrapper-Behavior-tp26498342p26498342.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26494451</id>
	<title>Pointers to members (and python)</title>
	<published>2009-11-24T03:32:19Z</published>
	<updated>2009-11-24T03:32:19Z</updated>
	<author>
		<name>Tristram Gräbener-2</name>
	</author>
	<content type="html">Hello,
&lt;br&gt;&lt;br&gt;I made some bindings from my C++ app for python.
&lt;br&gt;&lt;br&gt;The problem is that I use pointers to members (It's for computing
&lt;br&gt;shortest path and giving the property to minimize as parameter).
&lt;br&gt;&lt;br&gt;This is the C++ signature:
&lt;br&gt;&lt;br&gt;std::vector&amp;lt;Path&amp;gt; martins(int start, int dest, MultimodalGraph &amp; g,
&lt;br&gt;float Edge::*)
&lt;br&gt;&lt;br&gt;This is what I did (from what I understood in the doc):
&lt;br&gt;&lt;br&gt;%constant float Edge::* distance = &amp;Edge::distance;
&lt;br&gt;&lt;br&gt;This is how I call my function from python:
&lt;br&gt;&lt;br&gt;foo.martins(0, 1000, g, foo.distance)
&lt;br&gt;&lt;br&gt;And this is the error I get:
&lt;br&gt;&lt;br&gt;NotImplementedError: Wrong number of arguments for overloaded function
&lt;br&gt;'martins'.
&lt;br&gt;Possible C/C++ prototypes are:
&lt;br&gt;martins(int,int,MultimodalGraph &amp;,float Edge::*)
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; foo.distance
&lt;br&gt;&amp;lt;Swig Packed at _00000000_m_Edge__float&amp;gt;
&lt;br&gt;&lt;br&gt;I have an overloaded method that uses a default 4th paramaters, and it
&lt;br&gt;works perfectly.
&lt;br&gt;&lt;br&gt;So is it possible to use pointers to members with swig? If yes, what's
&lt;br&gt;the trick? If no, what would be the most elegant way to work arround?
&lt;br&gt;&lt;br&gt;Thank you for your help!
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26494451&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Pointers-to-members-%28and-python%29-tp26494451p26494451.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26494151</id>
	<title>wrapping template classes which wrap stl collections</title>
	<published>2009-11-24T03:09:12Z</published>
	<updated>2009-11-24T03:09:12Z</updated>
	<author>
		<name>Anton Lauridsen</name>
	</author>
	<content type="html">Hi
&lt;br&gt;&lt;br&gt;I thought I was pretty good at c++, but I've stumpled upon something I
&lt;br&gt;don't quite understand, first a little back-ground:
&lt;br&gt;&lt;br&gt;I'm trying to revive the Swig bindings for the Ogre3d rendering engine,
&lt;br&gt;things are progressing nicely, but, I've stumpled upon a problem:
&lt;br&gt;&lt;br&gt;The Ogre3D library comes with the ability to track memory allocations,
&lt;br&gt;and report leaks when exiting the program, naturally I'd like to use
&lt;br&gt;that feature in order to ensure that the wrappers doesn't leak.
&lt;br&gt;&lt;br&gt;for stl collections, this is done by wrapping the stl collections in a
&lt;br&gt;template class, I've provided a small sample here:
&lt;br&gt;&lt;br&gt;//for stl containter
&lt;br&gt;namespace Ogre
&lt;br&gt;{ 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; template &amp;lt;typename T, typename A = STLAllocator&amp;lt;T, GeneralAllocPolicy&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; struct deque 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { 
&lt;br&gt;#if OGRE_CONTAINERS_USE_CUSTOM_MEMORY_ALLOCATOR
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef typename std::deque&amp;lt;T, A&amp;gt; type; &amp;nbsp; &amp;nbsp;
&lt;br&gt;#else
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typedef typename std::deque&amp;lt;T&amp;gt; type; &amp;nbsp; &amp;nbsp;
&lt;br&gt;#endif
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }; 
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; template &amp;lt;typename T, typename A = STLAllocator&amp;lt;T, GeneralAllocPolicy&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; struct vector 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { 
&lt;br&gt;#if OGRE_CONTAINERS_USE_CUSTOM_MEMORY_ALLOCATOR
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typedef typename std::vector&amp;lt;T, A&amp;gt; type; &amp;nbsp; &amp;nbsp;
&lt;br&gt;#else
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typedef typename std::vector&amp;lt;T&amp;gt; type; &amp;nbsp; &amp;nbsp;
&lt;br&gt;#endif
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }; 
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; template &amp;lt;typename T, typename A = STLAllocator&amp;lt;T, GeneralAllocPolicy&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; struct list 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { 
&lt;br&gt;#if OGRE_CONTAINERS_USE_CUSTOM_MEMORY_ALLOCATOR
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef typename std::list&amp;lt;T, A&amp;gt; type; &amp;nbsp; &amp;nbsp;
&lt;br&gt;#else
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typedef typename std::list&amp;lt;T&amp;gt; type; &amp;nbsp; &amp;nbsp;
&lt;br&gt;#endif
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }; 
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; template &amp;lt;typename T, typename P = std::less&amp;lt;T&amp;gt;, typename A =
&lt;br&gt;STLAllocator&amp;lt;T, GeneralAllocPolicy&amp;gt; &amp;gt; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; struct set 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { 
&lt;br&gt;#if OGRE_CONTAINERS_USE_CUSTOM_MEMORY_ALLOCATOR
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef typename std::set&amp;lt;T, P, A&amp;gt; type; &amp;nbsp; &amp;nbsp;
&lt;br&gt;#else
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typedef typename std::set&amp;lt;T, P&amp;gt; type; &amp;nbsp; &amp;nbsp;
&lt;br&gt;#endif
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }; 
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; template &amp;lt;typename K, typename V, typename P = std::less&amp;lt;K&amp;gt;, typename A
&lt;br&gt;= STLAllocator&amp;lt;std::pair&amp;lt;const K, V&amp;gt;, GeneralAllocPolicy&amp;gt; &amp;gt; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; struct map 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { 
&lt;br&gt;#if OGRE_CONTAINERS_USE_CUSTOM_MEMORY_ALLOCATOR
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef typename std::map&amp;lt;K, V, P, A&amp;gt; type; 
&lt;br&gt;#else
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typedef typename std::map&amp;lt;K, V, P&amp;gt; type; 
&lt;br&gt;#endif
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }; 
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; template &amp;lt;typename K, typename V, typename P = std::less&amp;lt;K&amp;gt;, typename A
&lt;br&gt;= STLAllocator&amp;lt;std::pair&amp;lt;const K, V&amp;gt;, GeneralAllocPolicy&amp;gt; &amp;gt; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; struct multimap 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { 
&lt;br&gt;#if OGRE_CONTAINERS_USE_CUSTOM_MEMORY_ALLOCATOR
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typedef typename std::multimap&amp;lt;K, V, P, A&amp;gt; type; 
&lt;br&gt;#else
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typedef typename std::multimap&amp;lt;K, V, P&amp;gt; type; 
&lt;br&gt;#endif
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }; 
&lt;br&gt;&lt;br&gt;} // Ogre
&lt;br&gt;&lt;br&gt;&lt;br&gt;The STLAllocator&amp;lt;....&amp;gt; has some defines, taking care of the different
&lt;br&gt;allocation scenarios, i.e. whether &amp;nbsp;memory tracking is enabled or not.
&lt;br&gt;&lt;br&gt;here comes the part which I don't really understand:
&lt;br&gt;&lt;br&gt;typedef map&amp;lt;String, String&amp;gt;::type NameValuePairList;
&lt;br&gt;&lt;br&gt;I didn't even know that &amp;quot;::type&amp;quot; was legal c++
&lt;br&gt;&lt;br&gt;I tried to wrap it using:
&lt;br&gt;%template(NameValuePairList) Ogre::map&amp;lt;Ogre::String,
&lt;br&gt;Ogre::String&amp;gt;::type;
&lt;br&gt;&lt;br&gt;but Swig doesn't like the &amp;quot;::type&amp;quot; either, if I leave it out, 
&lt;br&gt;&lt;br&gt;void f(const Ogre::NameValuePairList *p);
&lt;br&gt;&lt;br&gt;gets wrapped as:
&lt;br&gt;&lt;br&gt;public void
&lt;br&gt;f(SWIGTYPE_p_Ogre__mapT_Ogre__String_Ogre__String_std__lessT_Ogre__String_t_STLAllocatorT_std__pairT_Ogre__String_const_Ogre__String_t_Ogre__GeneralAllocPolicy_t_t__type p)
&lt;br&gt;&lt;br&gt;I'd prefer the signature to be:
&lt;br&gt;public void f(NameValuePairList p);
&lt;br&gt;&lt;br&gt;Is there a simple way to achieve this or do I need to manually define
&lt;br&gt;the wrappers?
&lt;br&gt;&lt;br&gt;Any help would be greatly appreciated, especially this doing this
&lt;br&gt;manually would be quite a daunting task, given all the places that
&lt;br&gt;collections are used.
&lt;br&gt;&lt;br&gt;best regards
&lt;br&gt;/anton
&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26494151&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/wrapping-template-classes-which-wrap-stl-collections-tp26494151p26494151.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26493238</id>
	<title>ruby 1.9.1 wrapper file compile error ID GC_VALUE::hash_id = rb_intern(&quot;hash&quot;);</title>
	<published>2009-11-24T01:55:53Z</published>
	<updated>2009-11-24T01:55:53Z</updated>
	<author>
		<name>Sören Freudiger-2</name>
	</author>
	<content type="html">Hi
&lt;br&gt;The wrapper module of SWIG 1.3.40 s not 100% ruby 1.9.1 compatible since
&lt;br&gt;they changed
&lt;br&gt;&lt;br&gt;rb_intern(char *)
&lt;br&gt;&lt;br&gt;and 
&lt;br&gt;ID GC_VALUE::hash_id = rb_intern(&amp;quot;hash&amp;quot;);
&lt;br&gt;&lt;br&gt;does not compile any more...
&lt;br&gt;&lt;br&gt;see:
&lt;br&gt;&lt;a href=&quot;http://sourceforge.net/tracker/index.php?func=detail&amp;aid=2859614&amp;group_id=16&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/tracker/index.php?func=detail&amp;aid=2859614&amp;group_id=16&lt;/a&gt;&lt;br&gt;45&amp;atid=101645
&lt;br&gt;&lt;br&gt;Is there any patch or workaround available yet?
&lt;br&gt;&lt;br&gt;Best,
&lt;br&gt;SirAnn
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26493238&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problem-with-SwigValueWrapper-tp26156881p26493238.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26491762</id>
	<title>Re: Problem with SwigValueWrapper</title>
	<published>2009-11-23T23:47:43Z</published>
	<updated>2009-11-23T23:47:43Z</updated>
	<author>
		<name>wsfulton</name>
	</author>
	<content type="html">Robert Lupton the Good wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; This one I do think is a bug rather than a &amp;quot;feature&amp;quot;; &amp;nbsp;the non-use of &amp;nbsp;
&lt;br&gt;&amp;gt; SwigValueWrapper when it's needed, and the ignoring of a %feature 
&lt;br&gt;&amp;gt; (&amp;quot;valuewrapper&amp;quot;). &amp;nbsp;This is swig 1.3.40 and -python -c++.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; // -*- c++ -*-
&lt;br&gt;&amp;gt; %module hoo
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; %inline %{
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename Matrix&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;class MatrixBase {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;private:
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MatrixBase() {}
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;};
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;class Matrix { };
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename T&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;class TMatrix { };
&lt;br&gt;&amp;gt; %}
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; //%template(MMatrix) MatrixBase&amp;lt;Matrix&amp;gt;; &amp;nbsp;	// makes no difference
&lt;br&gt;&amp;gt; //%feature(&amp;quot;valuewrapper&amp;quot;) MatrixBase&amp;lt;Matrix&amp;gt;; 	// makes no difference
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; %typemap(in) MatrixBase&amp;lt;Matrix&amp;gt;() { }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; %inline %{
&lt;br&gt;&amp;gt; #if 1
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; void size(MatrixBase&amp;lt;Matrix&amp;gt; mat);	// fails
&lt;br&gt;&amp;gt; #else
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; void size(MatrixBase&amp;lt;TMatrix&amp;lt;int&amp;gt; &amp;gt; mat); // OK
&lt;br&gt;&amp;gt; #endif
&lt;br&gt;&amp;gt; %}
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; With &amp;quot;#if 1&amp;quot; (i.e. void size(MatrixBase&amp;lt;Matrix&amp;gt; mat);) the generated &amp;nbsp;
&lt;br&gt;&amp;gt; code uses:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; SWIGINTERN PyObject *_wrap_size(PyObject *SWIGUNUSEDPARM(self), &amp;nbsp;
&lt;br&gt;&amp;gt; PyObject *args) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;PyObject *resultobj = 0;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;MatrixBase&amp;lt; Matrix &amp;gt; arg1 ;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; and fails to compile due to MatrixBase's private constructor. &amp;nbsp;With &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;quot;#if 0&amp;quot; the code
&lt;br&gt;&amp;gt; uses SwigValueWrapper and all is well:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; SWIGINTERN PyObject *_wrap_size(PyObject *SWIGUNUSEDPARM(self), &amp;nbsp;
&lt;br&gt;&amp;gt; PyObject *args) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;PyObject *resultobj = 0;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;SwigValueWrapper&amp;lt; MatrixBase&amp;lt; TMatrix&amp;lt; int &amp;gt; &amp;gt; &amp;gt; arg1 ;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I'm actually most concerned about %feature(&amp;quot;valuewrapper&amp;quot;) &amp;nbsp;
&lt;br&gt;&amp;gt; MatrixBase&amp;lt;Matrix&amp;gt;; being apparently ignored &amp;nbsp;as I have a class that &amp;nbsp;
&lt;br&gt;&amp;gt; should have a private default constructor, but in fact has one that &amp;nbsp;
&lt;br&gt;&amp;gt; just crashes...
&lt;br&gt;&amp;gt; 
&lt;/div&gt;There is some strange bug here due to symbol clashes between the 
&lt;br&gt;template parameter 'Matrix' and the class 'Matrix'. If you change
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; template&amp;lt;typename Matrix&amp;gt; ...
&lt;br&gt;&lt;br&gt;to
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; template&amp;lt;typename M&amp;gt; ...
&lt;br&gt;&lt;br&gt;you can work around the problem. Alternatively, you need your feature 
&lt;br&gt;declarations before the class that you want to attach them to, so use this:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; %feature(&amp;quot;valuewrapper&amp;quot;) MatrixBase;
&lt;br&gt;&lt;br&gt;before MatrixBase is defined.
&lt;br&gt;&lt;br&gt;William
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26491762&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problem-with-SwigValueWrapper-tp26156881p26491762.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26491462</id>
	<title>Re: Problem with recognising a typemap defined in terms of	a typedef</title>
	<published>2009-11-23T23:18:51Z</published>
	<updated>2009-11-23T23:18:51Z</updated>
	<author>
		<name>wsfulton</name>
	</author>
	<content type="html">Robert Lupton the Good wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I figured out that the typemap defined for a typedef wasn't being 
&lt;br&gt;&amp;gt; applied to a declaration in terms of the underlying type but wasn't sure 
&lt;br&gt;&amp;gt; whether this was a bug or a feature.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; William says that it's a feature, so the docs could be clearer. &amp;nbsp;For 
&lt;br&gt;&amp;gt; example,
&lt;br&gt;&amp;gt;&amp;gt; Therefore, typemaps are unaffected by typedef, namespaces, and other 
&lt;br&gt;&amp;gt;&amp;gt; declarations that might hide the underlying type
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; This is true, but the opposite is not true --- underlying types are 
&lt;br&gt;&amp;gt; unaware of typedefs, and I think it'd be wise to add a note to the manual.
&lt;br&gt;&amp;gt; 
&lt;/div&gt;Clarification added at the end of the &amp;quot;Typedef reduction&amp;quot; section, svn 
&lt;br&gt;version viewable online at:
&lt;br&gt;&lt;a href=&quot;http://swig.svn.sourceforge.net/viewvc/swig/trunk/Doc/Manual/Typemaps.html#Typemaps_nn18&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://swig.svn.sourceforge.net/viewvc/swig/trunk/Doc/Manual/Typemaps.html#Typemaps_nn18&lt;/a&gt;&lt;br&gt;&lt;br&gt;William
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26491462&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problem-with-recognising-a-typemap-defined-in-terms-of-a-typedef-tp26132867p26491462.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26477796</id>
	<title>Re: Generating C# Interfaces for Proxy Classes</title>
	<published>2009-11-23T05:07:30Z</published>
	<updated>2009-11-23T05:07:30Z</updated>
	<author>
		<name>Juan Manuel Alvarez</name>
	</author>
	<content type="html">As far as I know, you will have to do it by hand.
&lt;br&gt;&lt;br&gt;Here is an example:
&lt;br&gt;&lt;br&gt;%nodefaultctor IMyInterface;
&lt;br&gt;%typemap(csbase, replace=&amp;quot;1&amp;quot;) IMyInterface &amp;quot;&amp;quot;;
&lt;br&gt;%typemap(csclassmodifiers) IMyInterface &amp;quot;interface&amp;quot;;
&lt;br&gt;%typemap(csbody) IMyInterface &amp;quot;&amp;quot;;
&lt;br&gt;%typemap(csfinalize) IMyInterface &amp;quot;&amp;quot;;
&lt;br&gt;%typemap(csdestruct) IMyInterface &amp;quot;&amp;quot;;
&lt;br&gt;%typemap(cscode) IMyInterface
&lt;br&gt;%{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // interface declaration here
&lt;br&gt;%}
&lt;br&gt;&lt;br&gt;%inline %{
&lt;br&gt;class IMyInterface{};
&lt;br&gt;%}
&lt;br&gt;&lt;br&gt;Then you just have to change the base of your wrapped class like this:
&lt;br&gt;%typemap(csinterfaces) MyClass &amp;quot;IMyInterface, IDisposable&amp;quot;;
&lt;br&gt;&lt;br&gt;Hope this helps!
&lt;br&gt;Juan M.
&lt;br&gt;&lt;br&gt;&lt;br&gt;On Mon, Nov 23, 2009 at 3:44 AM, Josh Rivers &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26477796&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;josh@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi All,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I've done some searching and seen mention of this previously, but I'm not
&lt;br&gt;&amp;gt; clear on whether a solution was ever implemented/found.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I'd like interfaces that match my generated proxy types to be generated
&lt;br&gt;&amp;gt; alongside the proxy classes (so that I can use mocking tools easily to
&lt;br&gt;&amp;gt; generate mock objects). Can SWIG be cajoled into generating a matching
&lt;br&gt;&amp;gt; interface for each proxy class?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt; Josh
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ------------------------------------------------------------------------------
&lt;br&gt;&amp;gt; Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
&lt;br&gt;&amp;gt; trial. Simplify your report design, integration and deployment - and focus
&lt;br&gt;&amp;gt; on
&lt;br&gt;&amp;gt; what you do best, core application coding. Discover what's new with
&lt;br&gt;&amp;gt; Crystal Reports now.  &lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; Swig-user mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26477796&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26477796&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Generating-C--Interfaces-for-Proxy-Classes-tp26473557p26477796.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26473557</id>
	<title>Generating C# Interfaces for Proxy Classes</title>
	<published>2009-11-22T22:44:28Z</published>
	<updated>2009-11-22T22:44:28Z</updated>
	<author>
		<name>Josh Rivers</name>
	</author>
	<content type="html">Hi All,&lt;br&gt;&lt;br&gt;I&amp;#39;ve done some searching and seen mention of this previously, but I&amp;#39;m not clear on whether a solution was ever implemented/found.&lt;br&gt;&lt;br&gt;I&amp;#39;d like interfaces that match my generated proxy types to be generated alongside the proxy classes (so that I can use mocking tools easily to generate mock objects). Can SWIG be cajoled into generating a matching interface for each proxy class?&lt;br&gt;
&lt;br&gt;Thanks,&lt;br&gt;Josh&lt;br&gt;
&lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26473557&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Generating-C--Interfaces-for-Proxy-Classes-tp26473557p26473557.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26467272</id>
	<title>SWIG-TCL working with array pointer</title>
	<published>2009-11-22T09:19:36Z</published>
	<updated>2009-11-22T09:19:36Z</updated>
	<author>
		<name>Ronen&amp;Galit</name>
	</author>
	<content type="html">&lt;html xmlns:o=&quot;urn:schemas-microsoft-com:office:office&quot; xmlns:w=&quot;urn:schemas-microsoft-com:office:word&quot; xmlns=&quot;http://www.w3.org/TR/REC-html40&quot;&gt;

&lt;head&gt;
&lt;meta http-equiv=Content-Type content=&quot;text/html; charset=us-ascii&quot;&gt;
&lt;meta name=Generator content=&quot;Microsoft Word 11 (filtered medium)&quot;&gt;


&lt;/head&gt;

&lt;body lang=EN-US link=blue vlink=purple&gt;

&lt;div class=Section1 dir=RTL&gt;

&lt;p class=MsoNormal align=right dir=RTL style='text-align:left'&gt;&lt;font size=2 face=Arial&gt;&lt;span dir=LTR style='font-size:10.0pt;font-family:Arial'&gt;Hi,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal align=right dir=RTL style='text-align:left'&gt;&lt;font size=2 face=Arial&gt;&lt;span dir=LTR style='font-size:10.0pt;font-family:Arial'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 color=blue face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;I am new to SWIG,
and tried successfully to get a working SWIG-TCL wrapping&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 color=blue face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;of a few basic function
API (i.e. swig.exe &amp;#8211;tcl example.i).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 color=blue face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 color=blue face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;Currently, I am
blocked in getting the SWIG-TCL wrapper of '&lt;/span&gt;&lt;/font&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;API_GetMessage&lt;font color=blue&gt;&lt;span style='color:blue'&gt;' &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 color=blue face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;listed below in
'C' code.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 color=blue face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 color=blue face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;I tried with
helper functions, cpointer.i lib, and also typemap.i but failed&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 color=blue face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;To get the final result
correctly. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 color=blue face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 color=blue face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;Q: I would like
to know if there is a straight solution built-in in SWIG&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 color=blue face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;&amp;nbsp;&amp;nbsp; Or it
needs some workarounds? Any comment are welcome.&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 color=blue face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 color=blue face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 color=blue face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;The TCL scripts&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 color=blue face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;-----------------------------------------------&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;set pMsg [new_buffer &amp;quot;This
is a test message&amp;quot;]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;set pMsgData [new_MESSAGE 0
0 $pMsg]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;set retCode [API_GetMessage
3 23 $pMsgData]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 color=blue face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;if&lt;/span&gt;&lt;/font&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;
{$retCode == 1} {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;&amp;nbsp; puts &lt;font color=maroon&gt;&lt;span style='color:maroon'&gt;&amp;quot;pMsg = $pMSg&amp;quot;&amp;nbsp;&amp;nbsp;
==========&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font size=2 color=maroon face=Wingdings&gt;&lt;span style='font-size:10.0pt;font-family:Wingdings;color:maroon'&gt;&amp;egrave;&lt;/span&gt;&lt;/font&gt;&lt;font size=2 color=maroon face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;;color:maroon'&gt; printing &amp;quot;&lt;/span&gt;&lt;/font&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;
This is a test message&lt;font color=maroon&gt;&lt;span style='color:maroon'&gt;&amp;quot;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;}&lt;font color=blue&gt;&lt;span style='color:blue'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 color=blue face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 color=blue face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 color=blue face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;The 'C' code&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 color=blue face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;----------------------------------------------&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 color=blue face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 color=blue face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;typedef&lt;/span&gt;&lt;/font&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;
&lt;font color=blue&gt;&lt;span style='color:blue'&gt;struct&lt;/span&gt;&lt;/font&gt; tagRECV_DATA&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;&amp;nbsp; &lt;font color=blue&gt;&lt;span style='color:blue'&gt;unsigned&lt;/span&gt;&lt;/font&gt; &lt;font color=blue&gt;&lt;span style='color:blue'&gt;long&lt;/span&gt;&lt;/font&gt; param;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;&amp;nbsp; &lt;font color=blue&gt;&lt;span style='color:blue'&gt;unsigned&lt;/span&gt;&lt;/font&gt; &lt;font color=blue&gt;&lt;span style='color:blue'&gt;long&lt;/span&gt;&lt;/font&gt; length;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;&amp;nbsp; &lt;font color=blue&gt;&lt;span style='color:blue'&gt;char&lt;/span&gt;&lt;/font&gt; *pData;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;} MESSAGE;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 color=blue face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;int&lt;/span&gt;&lt;/font&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;
API_GetMessage(&lt;font color=blue&gt;&lt;span style='color:blue'&gt;unsigned&lt;/span&gt;&lt;/font&gt;
&lt;font color=blue&gt;&lt;span style='color:blue'&gt;long&lt;/span&gt;&lt;/font&gt; param_1, &lt;font color=blue&gt;&lt;span style='color:blue'&gt;unsigned&lt;/span&gt;&lt;/font&gt; &lt;font color=blue&gt;&lt;span style='color:blue'&gt;long&lt;/span&gt;&lt;/font&gt; param_2, DATA_MSG *pMsg)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp; &lt;font color=green&gt;&lt;span style='color:green'&gt;/* Call target to get the Received data,
and fill pMsg buffer */&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 color=green face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:green'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp;
pMsg-&amp;gt;pData[0] = &lt;font color=maroon&gt;&lt;span style='color:maroon'&gt;'T'&lt;/span&gt;&lt;/font&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp;
pMsg-&amp;gt;pData[1] = &lt;font color=maroon&gt;&lt;span style='color:maroon'&gt;'h'&lt;/span&gt;&lt;/font&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp;
pMsg-&amp;gt;pData[2] = &lt;font color=maroon&gt;&lt;span style='color:maroon'&gt;'\0'&lt;/span&gt;&lt;/font&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 color=blue face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;#define&lt;/span&gt;&lt;/font&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;
DATA_MSG_LEN 100&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 color=blue face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;char&lt;/span&gt;&lt;/font&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;
*pPtr = malloc(DATA_MSG_LEN);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;DATA_MSG *pMessage = malloc(&lt;font color=blue&gt;&lt;span style='color:blue'&gt;sizeof&lt;/span&gt;&lt;/font&gt;(MESSAGE);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;pMessage-&amp;gt;param = 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;pMessage-&amp;gt;length = 7;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;pMessage-&amp;gt;pData =
pPtr;&amp;nbsp;&amp;nbsp; &lt;font color=green&gt;&lt;span style='color:green'&gt;/* assign the
data buffer */&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 color=green face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:green'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 color=green face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:green'&gt;/* call the
receive API function */&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 color=green face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:green'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 color=blue face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;int&lt;/span&gt;&lt;/font&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;
status = API_GetMessage(3, 4, pMessage);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 color=blue face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;if&lt;/span&gt;&lt;/font&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;
(status == 1)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;text-autospace:none;
direction:ltr;unicode-bidi:embed'&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp; printf (&lt;font color=maroon&gt;&lt;span style='color:maroon'&gt;&amp;quot;Received message = %s\n&amp;quot;&lt;/span&gt;&lt;/font&gt;,
pMessage-&amp;gt;pData);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal dir=LTR style='text-align:left;direction:ltr;unicode-bidi:
embed'&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;}&lt;/span&gt;&lt;/font&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;font-family:Arial'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal align=right dir=RTL style='text-align:left'&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=HE style='font-size:10.0pt;font-family:Arial'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal align=right dir=RTL style='text-align:left'&gt;&lt;font size=2 face=Arial&gt;&lt;span dir=LTR style='font-size:10.0pt;font-family:Arial'&gt;Thanks,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal align=right dir=RTL style='text-align:left'&gt;&lt;font size=2 face=Arial&gt;&lt;span dir=LTR style='font-size:10.0pt;font-family:Arial'&gt;Ronen&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;
&lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26467272&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/SWIG-TCL-working-with-array-pointer-tp26467272p26467272.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26461405</id>
	<title>std::set for Java and C#</title>
	<published>2009-11-21T15:19:16Z</published>
	<updated>2009-11-21T15:19:16Z</updated>
	<author>
		<name>Chad Retz</name>
	</author>
	<content type="html">Are there any plans to implement std_set.i for Java and/or C#? I don&amp;#39;t see it even in the trunk. Does anyone have a simple implementation for this anywhere before I attempt writing it myself? &lt;br&gt;&lt;br&gt;Thanks,&lt;br&gt;Chad&lt;br&gt;
&lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26461405&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/std%3A%3Aset-for-Java-and-C--tp26461405p26461405.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26445211</id>
	<title>Re: C++ precompilation instructions to python module with SWIG</title>
	<published>2009-11-20T07:24:53Z</published>
	<updated>2009-11-20T07:24:53Z</updated>
	<author>
		<name>Josh Cherry</name>
	</author>
	<content type="html">You can put #define's in your interface file.
&lt;br&gt;&lt;br&gt;Josh
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26445211&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/C%2B%2B-precompilation-instructions-to-python-module-with-SWIG-tp26369712p26445211.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26444265</id>
	<title>Re: C++ precompilation instructions to python module with SWIG</title>
	<published>2009-11-20T06:28:55Z</published>
	<updated>2009-11-20T06:28:55Z</updated>
	<author>
		<name>Sören Freudiger-2</name>
	</author>
	<content type="html">I also use CMake and SWIG.. But didnt play around with the given macros...
&lt;br&gt;&lt;br&gt;Just write your own macro, that's quite easy...
&lt;br&gt;&lt;br&gt;Why do I wrote my own macro:
&lt;br&gt;1. I want to have the dependency of my swig interface file to the includes
&lt;br&gt;header files (therefore I parse the xxx.i file and put them to DEPENDS later
&lt;br&gt;on)
&lt;br&gt;2. I need to put on every already defined preprocessor define to the swig
&lt;br&gt;compiler
&lt;br&gt;3. I want to source group my files in VS
&lt;br&gt;...
&lt;br&gt;&lt;br&gt;&lt;br&gt;I just attached the macro file.. maybe you can also use it or just ask the
&lt;br&gt;cmake community via the cmake email list :-)
&lt;br&gt;&lt;br&gt;You can use it as follows:
&lt;br&gt;&lt;br&gt;SET_SWIG_STUFF()
&lt;br&gt;SET(SWIG_FILE &amp;quot;interface1.i&amp;quot;)
&lt;br&gt;SET(GEN_FILES) #-&amp;gt; vor the generated files.. you can put these e.g. to
&lt;br&gt;ADDITIONAL_CLEAN_FILES
&lt;br&gt;SWIG_WAPP_CPP(SWIG_FILE &amp;quot;ruby&amp;quot; GEN_FILES)
&lt;br&gt;&lt;br&gt;But I would emphasize to play around with the given macros to figure out
&lt;br&gt;what's the problem within your CMakeLists.txt file
&lt;br&gt;&lt;br&gt;Std. Macros are:
&lt;br&gt;CMake2.8\share\cmake-2.8\Modules\FindSWIG.cmake 
&lt;br&gt;And:
&lt;br&gt;CMake2.8\share\cmake-2.8\Modules\UseSWIG.cmake
&lt;br&gt;&lt;br&gt;&lt;br&gt;Best SirAnn
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-----Ursprüngliche Nachricht-----
&lt;br&gt;Von: LittleBigYoan [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26444265&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;collet@...&lt;/a&gt;] 
&lt;br&gt;Gesendet: Dienstag, 17. November 2009 11:27
&lt;br&gt;An: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26444265&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;swig-user@...&lt;/a&gt;
&lt;br&gt;Betreff: Re: [Swig-user] C++ precompilation instructions to python module
&lt;br&gt;with SWIG
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Juan Manuel Alvarez wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Using -DNAME as a parameter on the command line, should do the trick.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;Seems not working, but maybe it comes to the fact I am using CMake to
&lt;br&gt;generate wrapper. &amp;nbsp;I give you my CMake relevant part if it can help you:
&lt;br&gt;&lt;br&gt;/* CMakeLists.txt */
&lt;br&gt;...
&lt;br&gt;FIND_PACKAGE( SWIG REQUIRED )
&lt;br&gt;INCLUDE( ${SWIG_USE_FILE} )
&lt;br&gt;&lt;br&gt;FIND_PACKAGE( PythonLibs REQUIRED )
&lt;br&gt;INCLUDE_DIRECTORIES( ${PYTHON_INCLUDE_PATH} )
&lt;br&gt;&lt;br&gt;SET( CMAKE_SWIG_FLAGS &amp;quot;&amp;quot; )
&lt;br&gt;&lt;br&gt;SET_SOURCE_FILES_PROPERTIES( example.i PROPERTIES CPLUSPLUS ON )
&lt;br&gt;SET_SOURCE_FILES_PROPERTIES( example.i PROPERTIES SWIG_FLAGS &amp;quot;-includeall&amp;quot; )
&lt;br&gt;SET_SOURCE_FILES_PROPERTIES( example.i PROPERTIES SWIG_FLAGS &amp;quot;-DNAME&amp;quot; )
&lt;br&gt;&amp;nbsp; 
&lt;br&gt;SWIG_ADD_MODULE( example python example.i )
&lt;br&gt;SWIG_LINK_LIBRARIES( example ${PYTHON_LIBRARIES} )
&lt;br&gt;&lt;br&gt;...
&lt;br&gt;/* END OF CMakeLists.txt */
&lt;br&gt;&lt;br&gt;Is there anything to change in my CMakeLists.txt ? 
&lt;br&gt;-- 
&lt;br&gt;View this message in context:
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/C%2B%2B-precompilation-instructions-to-python-module-w&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/C%2B%2B-precompilation-instructions-to-python-module-w&lt;/a&gt;&lt;br&gt;ith-SWIG-tp26369712p26387467.html
&lt;br&gt;Sent from the swig-user mailing list archive at Nabble.com.
&lt;br&gt;&lt;br&gt;&lt;br&gt;----------------------------------------------------------------------------
&lt;br&gt;--
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus
&lt;br&gt;on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26444265&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;br /&gt;################################################################
&lt;br&gt;### &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SET_SWIG_STUFF &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ###
&lt;br&gt;################################################################
&lt;br&gt;MACRO(SET_SWIG_STUFF )
&lt;br&gt;&amp;nbsp; &amp;nbsp;IF(NOT SWIG_FOUND)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; FIND_PACKAGE(SWIG REQUIRED)
&lt;br&gt;&amp;nbsp; &amp;nbsp;ENDIF()
&lt;br&gt;&amp;nbsp; &amp;nbsp;IF(NOT SWIG_FOUND)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; MESSAGE(&amp;quot;SET_SWIG_STUFF::could not find SWIG&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp;ENDIF()
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;IF(WIN32) &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ADD_DEFINITIONS(&amp;quot;-DNT=1&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ADD_DEFINITIONS(&amp;quot;-DIMPORT&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp;ENDIF()
&lt;br&gt;ENDMACRO(SET_SWIG_STUFF )
&lt;br&gt;&lt;br&gt;&lt;br&gt;################################################################
&lt;br&gt;### &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SET_SWIG_STUFF &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ###
&lt;br&gt;################################################################
&lt;br&gt;# swigfiles: e.g. vf.i
&lt;br&gt;# language: e.g. ruby
&lt;br&gt;# outfiles: list generated files AND swig files will be append on!
&lt;br&gt;#
&lt;br&gt;# it always uses the -c++ option (but feel free to extend this one)
&lt;br&gt;MACRO(SWIG_WAPP_CPP swigfiles language outFiles)
&lt;br&gt;&amp;nbsp; &amp;nbsp;IF(NOT SWIG_FOUND)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; MESSAGE(FATAL_ERROR &amp;quot;SWIG_WAPP_CPP::error SWIG package was not loaded&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp;ENDIF()
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;IF(${swigfiles})
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; FOREACH(swigfileName ${${swigfiles}}) 
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;################################################################
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# find headerfiles in interface file
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;################################################################
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FILE(READ &amp;quot;${swigfileName}&amp;quot; swigfile)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SET(header_file_var &amp;quot;&amp;quot;) #var initialisieren bzw. reseten
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MESSAGE(STATUS &amp;quot;scanning swigfile dependencies&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WHILE(NOT header_file_var STREQUAL swigfile)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; STRING(REGEX REPLACE &amp;quot;.*#include[ ]*[&amp;lt;\&amp;quot;]([^&amp;gt;\&amp;quot;]*)[&amp;gt;\&amp;quot;].*&amp;quot; &amp;quot;\\1&amp;quot; header_file_var &amp;quot;${swigfile}&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF(NOT header_file_var STREQUAL swigfile) #wenn nichts zu ersetzen ist.. -&amp;gt; steht in className wieder komplettes file
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #MESSAGE(&amp;quot;H: ${header_file_var}&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #headerfile aus swigfile löschen!
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; STRING(REGEX REPLACE &amp;quot;(.*)#include[ ]*[&amp;lt;\&amp;quot;][ ]*${header_file_var}[ ]*[&amp;gt;\&amp;quot;].*&amp;quot; &amp;quot;\\1&amp;quot; swigfile &amp;quot;${swigfile}&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SET(i_dependencies ${i_dependencies} ${header_file_var} )
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ENDIF()
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ENDWHILE()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MESSAGE(STATUS &amp;quot;scanning swigfile dependencies: done&amp;quot;)
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;################################################################
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# make rule
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;################################################################
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;################################################################
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# name for wrapper file
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;GET_FILENAME_COMPONENT(outname ${swigfileName} NAME_WE)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;GET_FILENAME_COMPONENT(outdir &amp;nbsp;${swigfileName} PATH)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;STRING(REGEX REPLACE &amp;quot;${SOURCE_ROOT}/&amp;quot; &amp;quot;&amp;quot; outdir ${outdir})
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SET(tempSourceGroupName ${outdir})
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SET(outdir ${CMAKE_CURRENT_BINARY_DIR}/swig_cpp/${outdir}) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FILE(MAKE_DIRECTORY ${outdir})
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SET(wrapper_file ${outdir}/${outname}_wrapp.cpp)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;################################################################
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# get include directories from direcotry
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;GET_DIRECTORY_PROPERTY(cmake_include_directories INCLUDE_DIRECTORIES)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SET(swig_include_dirs)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FOREACH(it ${cmake_include_directories})
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SET(swig_include_dirs ${swig_include_dirs} &amp;quot;-I${it}&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ENDFOREACH(it)
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;################################################################
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# get preprocessor defines
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;GET_DIRECTORY_PROPERTY(preProcessorDefs COMPILE_DEFINITIONS)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SET(swigPreProcessorDefs &amp;quot;&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FOREACH(define ${preProcessorDefs})
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LIST(APPEND swigPreProcessorDefs &amp;quot;-D${define}&amp;quot; ) &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ENDFOREACH()
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;################################################################
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# pre compile commando for the interface file 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ADD_CUSTOM_COMMAND(OUTPUT ${wrapper_file}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 		 &amp;nbsp; &amp;nbsp; &amp;nbsp; PRE_BUILD
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;COMMAND echo on \n ${SWIG_EXECUTABLE}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ARGS -c++ 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -${language} 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ${swig_include_dirs} 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ${swigPreProcessorDefs} 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -o ${wrapper_file} ${swigfileName}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MAIN_DEPENDENCY ${swigfileName} 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DEPENDS ${i_dependencies}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;COMMENT SWIG: generating ${wrapper_file} )
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SET(GENERATED_FILES ${GENERATED_FILES} ${outname}_wrapp.cpp)
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SET(${GENERATED_FILES} ${${GENERATED_FILES}} ${wrapper_file})
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SET(${outFiles} &amp;nbsp;${wrapper_file} )
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;################################################################
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# SOURCE GROUP
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;################################################################
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#STRING(REGEX REPLACE &amp;quot;${CMAKE_CURRENT_BINARY_DIR}/swig_cpp/&amp;quot; &amp;quot;&amp;quot; tempSourceGroupName ${outdir})
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#CAB_SOURCE_GROUP( ${tempSourceGroupName} ${swigfileName} ${wrapper_file} )
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ENDFOREACH()
&lt;br&gt;&amp;nbsp; &amp;nbsp;ENDIF()
&lt;br&gt;&lt;br&gt;ENDMACRO(SWIG_WAPP_CPP swigfiles outFiles)&lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26444265&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/C%2B%2B-precompilation-instructions-to-python-module-with-SWIG-tp26369712p26444265.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26442985</id>
	<title>Re: C++ precompilation instructions to python module with SWIG</title>
	<published>2009-11-20T05:03:03Z</published>
	<updated>2009-11-20T05:03:03Z</updated>
	<author>
		<name>Juan Manuel Alvarez</name>
	</author>
	<content type="html">I have never used CMake, so I can't help you on that, sorry! :(
&lt;br&gt;&lt;br&gt;Juan M.
&lt;br&gt;&lt;br&gt;On Tue, Nov 17, 2009 at 7:26 AM, LittleBigYoan &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26442985&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;collet@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Juan Manuel Alvarez wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Using -DNAME as a parameter on the command line, should do the trick.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Seems not working, but maybe it comes to the fact I am using CMake to
&lt;br&gt;&amp;gt; generate wrapper.  I give you my CMake relevant part if it can help you:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; /* CMakeLists.txt */
&lt;br&gt;&amp;gt; ...
&lt;br&gt;&amp;gt; FIND_PACKAGE( SWIG REQUIRED )
&lt;br&gt;&amp;gt; INCLUDE( ${SWIG_USE_FILE} )
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; FIND_PACKAGE( PythonLibs REQUIRED )
&lt;br&gt;&amp;gt; INCLUDE_DIRECTORIES( ${PYTHON_INCLUDE_PATH} )
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; SET( CMAKE_SWIG_FLAGS &amp;quot;&amp;quot; )
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; SET_SOURCE_FILES_PROPERTIES( example.i PROPERTIES CPLUSPLUS ON )
&lt;br&gt;&amp;gt; SET_SOURCE_FILES_PROPERTIES( example.i PROPERTIES SWIG_FLAGS &amp;quot;-includeall&amp;quot; )
&lt;br&gt;&amp;gt; SET_SOURCE_FILES_PROPERTIES( example.i PROPERTIES SWIG_FLAGS &amp;quot;-DNAME&amp;quot; )
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; SWIG_ADD_MODULE( example python example.i )
&lt;br&gt;&amp;gt; SWIG_LINK_LIBRARIES( example ${PYTHON_LIBRARIES} )
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ...
&lt;br&gt;&amp;gt; /* END OF CMakeLists.txt */
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Is there anything to change in my CMakeLists.txt ?
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; View this message in context: &lt;a href=&quot;http://old.nabble.com/C%2B%2B-precompilation-instructions-to-python-module-with-SWIG-tp26369712p26387467.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/C%2B%2B-precompilation-instructions-to-python-module-with-SWIG-tp26369712p26387467.html&lt;/a&gt;&lt;br&gt;&amp;gt; Sent from the swig-user mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ------------------------------------------------------------------------------
&lt;br&gt;&amp;gt; Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
&lt;br&gt;&amp;gt; trial. Simplify your report design, integration and deployment - and focus on
&lt;br&gt;&amp;gt; what you do best, core application coding. Discover what's new with
&lt;br&gt;&amp;gt; Crystal Reports now.  &lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; Swig-user mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26442985&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26442985&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/C%2B%2B-precompilation-instructions-to-python-module-with-SWIG-tp26369712p26442985.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26440538</id>
	<title>Re: Embed perl and multi-threading (Re: segmentation fault in event-driven library wrapped with swig)</title>
	<published>2009-11-20T01:29:06Z</published>
	<updated>2009-11-20T01:29:06Z</updated>
	<author>
		<name>Sri-26</name>
	</author>
	<content type="html">Please see my post here for a resolution I found for this issue.
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://markmail.org/message/cjbhybjfikuirvud&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://markmail.org/message/cjbhybjfikuirvud&lt;/a&gt;&lt;br&gt;&lt;br&gt;Thx
&lt;br&gt;&lt;br&gt;--- On Mon, 11/2/09, Sri &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26440538&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;w2learn@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; From: Sri &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26440538&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;w2learn@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Subject: Embed perl and multi-threading (Re: segmentation fault in event-driven library wrapped with swig)
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26440538&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;swig-user@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Date: Monday, November 2, 2009, 8:35 AM
&lt;br&gt;&amp;gt; Hi all,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; In digging further into this, I feel that the
&lt;br&gt;&amp;gt; pthread_getspecific() functions are not finding the perl
&lt;br&gt;&amp;gt; interpreter instance corresponding to the thread in my
&lt;br&gt;&amp;gt; library.  I guess its because I havent really created
&lt;br&gt;&amp;gt; one yet? To test if this was the cause, I modified my
&lt;br&gt;&amp;gt; SWIG_Wrap_bsa_disc_callback method to create a new
&lt;br&gt;&amp;gt; perl-interpreter when my_perl is NULL and the crash is now
&lt;br&gt;&amp;gt; occuring at the call_sv.  I realize its not the right
&lt;br&gt;&amp;gt; way to do it, but not sure exactly the steps required. 
&lt;br&gt;&amp;gt; I think the solution likely involves my library thread
&lt;br&gt;&amp;gt; creating a interpreter instance and saving relevant data
&lt;br&gt;&amp;gt; (what is relevant?) via pthread_setspecific
&lt;br&gt;&amp;gt; method/SET_CONTEXT().
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Would be great if anyone can shed some light or confirm if
&lt;br&gt;&amp;gt; I'm on the right track.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thx
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; void SWIG_Wrap_bsa_disc_callback(int event, tMy_MSG
&lt;br&gt;&amp;gt; *p_data)
&lt;br&gt;&amp;gt; {
&lt;br&gt;&amp;gt;       int new_perl = 0;
&lt;br&gt;&amp;gt;       printf(&amp;quot;entering perl callback
&lt;br&gt;&amp;gt; handler...\n&amp;quot;);
&lt;br&gt;&amp;gt;       dTHX;
&lt;br&gt;&amp;gt;       printf(&amp;quot;dTHX done...\n&amp;quot;);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;       if ( my_perl != NULL )
&lt;br&gt;&amp;gt;          printf (&amp;quot;my_perl ==
&lt;br&gt;&amp;gt; %ul\n&amp;quot;, my_perl);
&lt;br&gt;&amp;gt;       else
&lt;br&gt;&amp;gt;       {
&lt;br&gt;&amp;gt;          printf (&amp;quot;my_perl was
&lt;br&gt;&amp;gt; NULL\n&amp;quot;);
&lt;br&gt;&amp;gt;          my_perl =
&lt;br&gt;&amp;gt; perl_alloc();
&lt;br&gt;&amp;gt;      
&lt;br&gt;&amp;gt;    PERL_SET_CONTEXT(my_perl);
&lt;br&gt;&amp;gt;          new_perl = 1;
&lt;br&gt;&amp;gt;       }
&lt;br&gt;&amp;gt; /*
&lt;br&gt;&amp;gt;       printf(&amp;quot;Destruct level : %d...\n&amp;quot;,
&lt;br&gt;&amp;gt; PL_perl_destruct_level);
&lt;br&gt;&amp;gt; */
&lt;br&gt;&amp;gt;       dSP;
&lt;br&gt;&amp;gt;       printf(&amp;quot;DSP done...\n&amp;quot;);
&lt;br&gt;&amp;gt;       SV * sv = bsa_perl_disc_callback;
&lt;br&gt;&amp;gt;       if (sv == (SV*)NULL)
&lt;br&gt;&amp;gt;          croak(&amp;quot;Internal
&lt;br&gt;&amp;gt; error...\n&amp;quot;);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;       printf(&amp;quot;Preparing to call perl
&lt;br&gt;&amp;gt; callback...\n&amp;quot;);
&lt;br&gt;&amp;gt;       PUSHMARK(SP);
&lt;br&gt;&amp;gt;       XPUSHs(sv_2mortal(newSViv(event)));
&lt;br&gt;&amp;gt;       printf(&amp;quot;newSViv of %d done...\n&amp;quot;,
&lt;br&gt;&amp;gt; event);
&lt;br&gt;&amp;gt;      
&lt;br&gt;&amp;gt; XPUSHs(SWIG_NewPointerObj(SWIG_as_voidptr(p_data),
&lt;br&gt;&amp;gt; SWIGTYPE_p_tMy_MSG, SWIG_SHADOW));
&lt;br&gt;&amp;gt;       /* XPUSHs(sv_2mortal(newSVsv((SV
&lt;br&gt;&amp;gt; *)p_data))); */
&lt;br&gt;&amp;gt;       printf(&amp;quot;newSVsv...\n&amp;quot;);
&lt;br&gt;&amp;gt;       PUTBACK;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;       printf(&amp;quot;calling the Perl sub...\n&amp;quot;);
&lt;br&gt;&amp;gt;       /* Call the Perl sub */
&lt;br&gt;&amp;gt;       call_sv(sv, G_DISCARD);
&lt;br&gt;&amp;gt;       printf(&amp;quot;Perl sub completed
&lt;br&gt;&amp;gt; successfully...\n&amp;quot;);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;       if ( new_perl )
&lt;br&gt;&amp;gt;         perl_free(my_perl);
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; --- On Fri, 10/30/09, Sri &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26440538&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;w2learn@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; From: Sri &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26440538&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;w2learn@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Subject: segmentation fault in event-driven library
&lt;br&gt;&amp;gt; wrapped with swig
&lt;br&gt;&amp;gt; &amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26440538&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;swig-user@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt; Date: Friday, October 30, 2009, 8:35 PM
&lt;br&gt;&amp;gt; &amp;gt; Hello SWIG, perl experts:
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; With good help from swig-users posts &amp; Stephen
&lt;br&gt;&amp;gt; Chan in
&lt;br&gt;&amp;gt; &amp;gt; particular, I've figured out how to wrap a C
&lt;br&gt;&amp;gt; event-driven
&lt;br&gt;&amp;gt; &amp;gt; library with SWIG.  SWIG is really nice tool!  I'm
&lt;br&gt;&amp;gt; able to
&lt;br&gt;&amp;gt; &amp;gt; call APIs and register perl-sub as callback into the
&lt;br&gt;&amp;gt; C
&lt;br&gt;&amp;gt; &amp;gt; library. If I invoke the perl callback as part of an
&lt;br&gt;&amp;gt; API
&lt;br&gt;&amp;gt; &amp;gt; invoked from Perl script, the callback is called (in
&lt;br&gt;&amp;gt; perls
&lt;br&gt;&amp;gt; &amp;gt; main thread).  However, when the same callback
&lt;br&gt;&amp;gt; handler
&lt;br&gt;&amp;gt; &amp;gt; invokes the callback via a different thread (based on
&lt;br&gt;&amp;gt; async
&lt;br&gt;&amp;gt; &amp;gt; event), it crashes at the &amp;quot;dSP;&amp;quot; line. 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; I've tried adding &amp;quot;dTX&amp;quot; before &amp;quot;dSP;&amp;quot; and also tried
&lt;br&gt;&amp;gt; &amp;gt; enabling more macros to match how my perl is built. 
&lt;br&gt;&amp;gt; So far
&lt;br&gt;&amp;gt; &amp;gt; no luck.  The line that crashes is below
&lt;br&gt;&amp;gt; (pre-processor
&lt;br&gt;&amp;gt; &amp;gt; output).  &amp;quot;dTHX done&amp;quot; is printed, but crashes before
&lt;br&gt;&amp;gt; &amp;gt; &amp;quot;DSP done&amp;quot; is printed.
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt;       printf(&amp;quot;entering perl callback
&lt;br&gt;&amp;gt; &amp;gt; handler...\n&amp;quot;);
&lt;br&gt;&amp;gt; &amp;gt;       register PerlInterpreter *my_perl
&lt;br&gt;&amp;gt; &amp;gt; __attribute__((unused)) = ((PerlInterpreter
&lt;br&gt;&amp;gt; &amp;gt; *)pthread_getspecific((*Perl_Gthr_key_ptr(((void
&lt;br&gt;&amp;gt; *)0)))));
&lt;br&gt;&amp;gt; &amp;gt;       printf(&amp;quot;dTHX done...\n&amp;quot;);
&lt;br&gt;&amp;gt; &amp;gt;       register SV **sp =
&lt;br&gt;&amp;gt; &amp;gt; (*Perl_Tstack_sp_ptr(((PerlInterpreter
&lt;br&gt;&amp;gt; &amp;gt; *)pthread_getspecific((*Perl_Gthr_key_ptr(((void
&lt;br&gt;&amp;gt; &amp;gt; *)0)))))));  &amp;lt;-- CRASHES!!
&lt;br&gt;&amp;gt; &amp;gt;       printf(&amp;quot;DSP done...\n&amp;quot;);
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; The perl-callback handler code
&lt;br&gt;&amp;gt; &amp;gt; ------------------------------
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; void SWIG_Wrap_bsa_disc_callback(int event, tMy_MSG
&lt;br&gt;&amp;gt; &amp;gt; *p_data)
&lt;br&gt;&amp;gt; &amp;gt; {
&lt;br&gt;&amp;gt; &amp;gt;       printf(&amp;quot;entering perl callback
&lt;br&gt;&amp;gt; &amp;gt; handler...\n&amp;quot;);
&lt;br&gt;&amp;gt; &amp;gt;       dTHX;
&lt;br&gt;&amp;gt; &amp;gt;       printf(&amp;quot;dTHX done...\n&amp;quot;);
&lt;br&gt;&amp;gt; &amp;gt;       dSP;
&lt;br&gt;&amp;gt; &amp;gt;       printf(&amp;quot;DSP done...\n&amp;quot;);
&lt;br&gt;&amp;gt; &amp;gt;       SV * sv = bsa_perl_disc_callback;
&lt;br&gt;&amp;gt; &amp;gt;       if (sv == (SV*)NULL)
&lt;br&gt;&amp;gt; &amp;gt;          croak(&amp;quot;Internal
&lt;br&gt;&amp;gt; &amp;gt; error...\n&amp;quot;);
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt;       printf(&amp;quot;Preparing to call perl
&lt;br&gt;&amp;gt; &amp;gt; callback...\n&amp;quot;);
&lt;br&gt;&amp;gt; &amp;gt;       PUSHMARK(SP);
&lt;br&gt;&amp;gt; &amp;gt;       XPUSHs(sv_2mortal(newSViv(event)));
&lt;br&gt;&amp;gt; &amp;gt;       printf(&amp;quot;newSViv of %d done...\n&amp;quot;,
&lt;br&gt;&amp;gt; &amp;gt; event);
&lt;br&gt;&amp;gt; &amp;gt;      
&lt;br&gt;&amp;gt; &amp;gt; XPUSHs(SWIG_NewPointerObj(SWIG_as_voidptr(p_data),
&lt;br&gt;&amp;gt; &amp;gt; SWIGTYPE_p_tMy_MSG, SWIG_SHADOW));
&lt;br&gt;&amp;gt; &amp;gt;       /* XPUSHs(sv_2mortal(newSVsv((SV
&lt;br&gt;&amp;gt; &amp;gt; *)p_data))); */
&lt;br&gt;&amp;gt; &amp;gt;       printf(&amp;quot;newSVsv...\n&amp;quot;);
&lt;br&gt;&amp;gt; &amp;gt;       PUTBACK;
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt;       printf(&amp;quot;calling the Perl sub...\n&amp;quot;);
&lt;br&gt;&amp;gt; &amp;gt;       /* Call the Perl sub */
&lt;br&gt;&amp;gt; &amp;gt;       call_sv(sv, G_DISCARD);
&lt;br&gt;&amp;gt; &amp;gt;       printf(&amp;quot;Perl sub completed
&lt;br&gt;&amp;gt; &amp;gt; successfully...\n&amp;quot;);
&lt;br&gt;&amp;gt; &amp;gt; }
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Options when running SWIG:
&lt;br&gt;&amp;gt; &amp;gt; --------------------------
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; swig -includeall -I. -I &amp;lt;lots of others proj
&lt;br&gt;&amp;gt; specific
&lt;br&gt;&amp;gt; &amp;gt; dirs&amp;gt; -perl5 -outdir &amp;lt;outdir&amp;gt; -module
&lt;br&gt;&amp;gt; &amp;gt; &amp;lt;module&amp;gt; my_api.i
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Options when compliling _wrap.c:
&lt;br&gt;&amp;gt; &amp;gt; --------------------------------
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; gcc -E -Dbool=char -fpic -D_REENTRANT -D_GNU_SOURCE
&lt;br&gt;&amp;gt; &amp;gt; -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing
&lt;br&gt;&amp;gt; -pipe
&lt;br&gt;&amp;gt; &amp;gt; -isystem /usr/local/include -D_LARGEFILE_SOURCE
&lt;br&gt;&amp;gt; &amp;gt; -D_FILE_OFFSET_BITS=64 -DSWIG -g -DMULTIPLICITY
&lt;br&gt;&amp;gt; &amp;gt; -DPERL_IMPLICIT_CONTEXT -DTHREADS_HAVE_PIDS
&lt;br&gt;&amp;gt; &amp;gt; -DUSE_LARGE_FILES -DUSE_PERLIO -DUSE_REENTRANT_API
&lt;br&gt;&amp;gt; &amp;gt; -DBSA_CLIENT -I/usr/lib/perl/5.8/CORE/
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Output from perl -V
&lt;br&gt;&amp;gt; &amp;gt; -------------------
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Summary of my perl5 (revision 5 version 8 subversion
&lt;br&gt;&amp;gt; 8)
&lt;br&gt;&amp;gt; &amp;gt; configuration:
&lt;br&gt;&amp;gt; &amp;gt;   Platform:
&lt;br&gt;&amp;gt; &amp;gt;     osname=linux, osvers=2.6.24-19-server,
&lt;br&gt;&amp;gt; &amp;gt; archname=i486-linux-gnu-thread-multi
&lt;br&gt;&amp;gt; &amp;gt;     uname='linux palmer 2.6.24-19-server #1 smp
&lt;br&gt;&amp;gt; &amp;gt; sat jul 12 00:40:01 utc 2008 i686 gnulinux '
&lt;br&gt;&amp;gt; &amp;gt;     config_args='-Dusethreads -Duselargefiles
&lt;br&gt;&amp;gt; &amp;gt; -Dccflags=-DDEBIAN -Dcccdlflags=-fPIC
&lt;br&gt;&amp;gt; &amp;gt; -Darchname=i486-linux-gnu -Dprefix=/usr
&lt;br&gt;&amp;gt; &amp;gt; -Dprivlib=/usr/share/perl/5.8
&lt;br&gt;&amp;gt; -Darchlib=/usr/lib/perl/5.8
&lt;br&gt;&amp;gt; &amp;gt; -Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5
&lt;br&gt;&amp;gt; &amp;gt; -Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local
&lt;br&gt;&amp;gt; &amp;gt; -Dsitelib=/usr/local/share/perl/5.8.8
&lt;br&gt;&amp;gt; &amp;gt; -Dsitearch=/usr/local/lib/perl/5.8.8
&lt;br&gt;&amp;gt; &amp;gt; -Dman1dir=/usr/share/man/man1
&lt;br&gt;&amp;gt; -Dman3dir=/usr/share/man/man3
&lt;br&gt;&amp;gt; &amp;gt; -Dsiteman1dir=/usr/local/man/man1
&lt;br&gt;&amp;gt; &amp;gt; -Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1
&lt;br&gt;&amp;gt; &amp;gt; -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager -Uafs
&lt;br&gt;&amp;gt; &amp;gt; -Ud_csh -Ud_ualarm -Uusesfio -Uusenm -Duseshrplib
&lt;br&gt;&amp;gt; &amp;gt; -Dlibperl=libperl.so.5.8.8 -Dd_dosuid -des'
&lt;br&gt;&amp;gt; &amp;gt;     hint=recommended, useposix=true,
&lt;br&gt;&amp;gt; &amp;gt; d_sigaction=define
&lt;br&gt;&amp;gt; &amp;gt;     usethreads=define use5005threads=undef
&lt;br&gt;&amp;gt; &amp;gt; useithreads=define usemultiplicity=define
&lt;br&gt;&amp;gt; &amp;gt;     useperlio=define d_sfio=undef
&lt;br&gt;&amp;gt; &amp;gt; uselargefiles=define usesocks=undef
&lt;br&gt;&amp;gt; &amp;gt;     use64bitint=undef use64bitall=undef
&lt;br&gt;&amp;gt; &amp;gt; uselongdouble=undef
&lt;br&gt;&amp;gt; &amp;gt;     usemymalloc=n, bincompat5005=undef
&lt;br&gt;&amp;gt; &amp;gt;   Compiler:
&lt;br&gt;&amp;gt; &amp;gt;     cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE
&lt;br&gt;&amp;gt; &amp;gt; -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing
&lt;br&gt;&amp;gt; -pipe
&lt;br&gt;&amp;gt; &amp;gt; -I/usr/local/include -D_LARGEFILE_SOURCE
&lt;br&gt;&amp;gt; &amp;gt; -D_FILE_OFFSET_BITS=64',
&lt;br&gt;&amp;gt; &amp;gt;     optimize='-O2',
&lt;br&gt;&amp;gt; &amp;gt;     cppflags='-D_REENTRANT -D_GNU_SOURCE
&lt;br&gt;&amp;gt; &amp;gt; -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing
&lt;br&gt;&amp;gt; -pipe
&lt;br&gt;&amp;gt; &amp;gt; -I/usr/local/include'
&lt;br&gt;&amp;gt; &amp;gt;     ccversion='', gccversion='4.2.3 (Ubuntu
&lt;br&gt;&amp;gt; &amp;gt; 4.2.3-2ubuntu7)', gccosandvers=''
&lt;br&gt;&amp;gt; &amp;gt;     intsize=4, longsize=4, ptrsize=4,
&lt;br&gt;&amp;gt; &amp;gt; doublesize=8, byteorder=1234
&lt;br&gt;&amp;gt; &amp;gt;     d_longlong=define, longlongsize=8,
&lt;br&gt;&amp;gt; &amp;gt; d_longdbl=define, longdblsize=12
&lt;br&gt;&amp;gt; &amp;gt;     ivtype='long', ivsize=4, nvtype='double',
&lt;br&gt;&amp;gt; &amp;gt; nvsize=8, Off_t='off_t', lseeksize=8
&lt;br&gt;&amp;gt; &amp;gt;     alignbytes=4, prototype=define
&lt;br&gt;&amp;gt; &amp;gt;   Linker and Libraries:
&lt;br&gt;&amp;gt; &amp;gt;     ld='cc', ldflags =' -L/usr/local/lib'
&lt;br&gt;&amp;gt; &amp;gt;     libpth=/usr/local/lib /lib /usr/lib
&lt;br&gt;&amp;gt; &amp;gt;     libs=-lgdbm -lgdbm_compat -ldb -ldl -lm
&lt;br&gt;&amp;gt; &amp;gt; -lpthread -lc -lcrypt
&lt;br&gt;&amp;gt; &amp;gt;     perllibs=-ldl -lm -lpthread -lc -lcrypt
&lt;br&gt;&amp;gt; &amp;gt;     libc=/lib/libc-2.7.so, so=so,
&lt;br&gt;&amp;gt; &amp;gt; useshrplib=true, libperl=libperl.so.5.8.8
&lt;br&gt;&amp;gt; &amp;gt;     gnulibc_version='2.7'
&lt;br&gt;&amp;gt; &amp;gt;   Dynamic Linking:
&lt;br&gt;&amp;gt; &amp;gt;     dlsrc=dl_dlopen.xs, dlext=so,
&lt;br&gt;&amp;gt; &amp;gt; d_dlsymun=undef, ccdlflags='-Wl,-E'
&lt;br&gt;&amp;gt; &amp;gt;     cccdlflags='-fPIC', lddlflags='-shared
&lt;br&gt;&amp;gt; &amp;gt; -L/usr/local/lib'
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Characteristics of this binary (from libperl):
&lt;br&gt;&amp;gt; &amp;gt;   Compile-time options: MULTIPLICITY
&lt;br&gt;&amp;gt; &amp;gt; PERL_IMPLICIT_CONTEXT
&lt;br&gt;&amp;gt; &amp;gt;                
&lt;br&gt;&amp;gt; &amp;gt;         PERL_MALLOC_WRAP
&lt;br&gt;&amp;gt; &amp;gt; THREADS_HAVE_PIDS USE_ITHREADS
&lt;br&gt;&amp;gt; &amp;gt;                
&lt;br&gt;&amp;gt; &amp;gt;         USE_LARGE_FILES USE_PERLIO
&lt;br&gt;&amp;gt; &amp;gt; USE_REENTRANT_API
&lt;br&gt;&amp;gt; &amp;gt;   Built under linux
&lt;br&gt;&amp;gt; &amp;gt;   Compiled at Jan 14 2009 22:34:36
&lt;br&gt;&amp;gt; &amp;gt;   @INC:
&lt;br&gt;&amp;gt; &amp;gt;     /etc/perl
&lt;br&gt;&amp;gt; &amp;gt;     /usr/local/lib/perl/5.8.8
&lt;br&gt;&amp;gt; &amp;gt;     /usr/local/share/perl/5.8.8
&lt;br&gt;&amp;gt; &amp;gt;     /usr/lib/perl5
&lt;br&gt;&amp;gt; &amp;gt;     /usr/share/perl5
&lt;br&gt;&amp;gt; &amp;gt;     /usr/lib/perl/5.8
&lt;br&gt;&amp;gt; &amp;gt;     /usr/share/perl/5.8
&lt;br&gt;&amp;gt; &amp;gt;     /usr/local/lib/site_perl
&lt;br&gt;&amp;gt; &amp;gt;     .
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; output from gcc -v
&lt;br&gt;&amp;gt; &amp;gt; ------------------
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt;  gcc -v
&lt;br&gt;&amp;gt; &amp;gt; Using built-in specs.
&lt;br&gt;&amp;gt; &amp;gt; Target: i486-linux-gnu
&lt;br&gt;&amp;gt; &amp;gt; Configured with: ../src/configure -v
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; --enable-languages=c,c++,fortran,objc,obj-c++,treelang
&lt;br&gt;&amp;gt; &amp;gt; --prefix=/usr --enable-shared --with-system-zlib
&lt;br&gt;&amp;gt; &amp;gt; --libexecdir=/usr/lib --without-included-gettext
&lt;br&gt;&amp;gt; &amp;gt; --enable-threads=posix --enable-nls
&lt;br&gt;&amp;gt; &amp;gt; --with-gxx-include-dir=/usr/include/c++/4.2
&lt;br&gt;&amp;gt; &amp;gt; --program-suffix=-4.2 --enable-clocale=gnu
&lt;br&gt;&amp;gt; &amp;gt; --enable-libstdcxx-debug --enable-objc-gc
&lt;br&gt;&amp;gt; --enable-mpfr
&lt;br&gt;&amp;gt; &amp;gt; --enable-targets=all --enable-checking=release
&lt;br&gt;&amp;gt; &amp;gt; --build=i486-linux-gnu --host=i486-linux-gnu
&lt;br&gt;&amp;gt; &amp;gt; --target=i486-linux-gnu
&lt;br&gt;&amp;gt; &amp;gt; Thread model: posix
&lt;br&gt;&amp;gt; &amp;gt; gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26440538&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-Embed-perl-and-multi-threading-%28Re%3A-segmentation-fault-in-event-driven-library-wrapped-with-swig%29-tp26440538p26440538.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26433955</id>
	<title>Re: Swig : Objective-C : Documentation and Next Steps</title>
	<published>2009-11-19T12:52:14Z</published>
	<updated>2009-11-19T12:52:14Z</updated>
	<author>
		<name>Ashish Sharma-4</name>
	</author>
	<content type="html">&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Thu, Nov 19, 2009 at 12:12 PM, Gregory Sogorka &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26433955&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;blackberryoctopus@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex&quot;&gt;

&lt;span style=&quot;font-family:arial, sans-serif;font-size:13px;border-collapse:collapse&quot;&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I&amp;#39;ve checked out this branch of the Swig repo : &lt;span style=&quot;border-collapse:separate;font-family:Times, sans-serif;font-size:medium&quot;&gt;&lt;a href=&quot;http://swig.svn.sourceforge.net/viewvc/swig/branches/gsoc2009-ashishs99&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://swig.svn.sourceforge.net/viewvc/swig/branches/gsoc2009-ashishs99&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;



&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Pertinent Information :&lt;/div&gt;&lt;div&gt;&lt;div&gt;OS : OSX 10.5.8&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;swig : SWIG Version 1.3.41&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;gcc : i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5493)&lt;/div&gt;


&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;After building, I used one the examples found in the perl tutorial for swig in an attempt to test the objective c support&lt;/div&gt;



&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I ran the following :&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;$ ls&lt;/div&gt;&lt;div&gt;example.c          example.i    &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;$ ~/swig-objc/bin/swig -objc ./example.i &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;



&lt;div&gt;&lt;div&gt;$ ls&lt;/div&gt;&lt;div&gt;example.c          example.i          exampleProxy.h     exampleProxy.m     exampleWrapper.h   exampleWrapper.mm &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;This command has now built the following files :  exampleProxy.h     exampleProxy.m     exampleWrapper.h   exampleWrapper.mm &lt;/div&gt;



&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I am curious if anyone can guide me to either 1) documentation that explains what my next steps should be in the process of incorporating my c code into my objc code. or 2) provide a brief response that might serve as guidance for next steps&lt;/div&gt;

&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;There is no proper documentation as yet but you can look at examples in &amp;#39;Examples/objc&amp;#39; to get an idea of the existing support and how you can compile objc code with C/C++ code.&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex&quot;&gt;
&lt;span style=&quot;font-family:arial, sans-serif;font-size:13px;border-collapse:collapse&quot;&gt;&lt;div&gt;&lt;div&gt;

&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Thanks in advance for any help you might provide. &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;font color=&quot;#888888&quot;&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Gregory&lt;/div&gt;&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;
&lt;br&gt;------------------------------------------------------------------------------&lt;br&gt;
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day&lt;br&gt;
trial. Simplify your report design, integration and deployment - and focus on&lt;br&gt;
what you do best, core application coding. Discover what&amp;#39;s new with&lt;br&gt;
Crystal Reports now.  &lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________&lt;br&gt;
Swig-user mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26433955&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
&lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26433955&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Swig-%3A-Objective-C-%3A-Documentation-and-Next-Steps-tp26431336p26433955.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26431336</id>
	<title>Swig : Objective-C : Documentation and Next Steps</title>
	<published>2009-11-19T10:12:35Z</published>
	<updated>2009-11-19T10:12:35Z</updated>
	<author>
		<name>Gregory Sogorka</name>
	</author>
	<content type="html">&lt;span style=&quot;font-family:arial, sans-serif;font-size:13px;border-collapse:collapse&quot;&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I&amp;#39;ve checked out this branch of the Swig repo : &lt;span style=&quot;border-collapse:separate;font-family:Times, sans-serif;font-size:medium&quot;&gt;&lt;a href=&quot;http://swig.svn.sourceforge.net/viewvc/swig/branches/gsoc2009-ashishs99&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://swig.svn.sourceforge.net/viewvc/swig/branches/gsoc2009-ashishs99&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;

&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Pertinent Information :&lt;/div&gt;&lt;div&gt;&lt;div&gt;OS : OSX 10.5.8&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;swig : SWIG Version 1.3.41&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;gcc : i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5493)&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;After building, I used one the examples found in the perl tutorial for swig in an attempt to test the objective c support&lt;/div&gt;

&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I ran the following :&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;$ ls&lt;/div&gt;&lt;div&gt;example.c          example.i    &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;$ ~/swig-objc/bin/swig -objc ./example.i &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;

&lt;div&gt;&lt;div&gt;$ ls&lt;/div&gt;&lt;div&gt;example.c          example.i          exampleProxy.h     exampleProxy.m     exampleWrapper.h   exampleWrapper.mm &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;This command has now built the following files :  exampleProxy.h     exampleProxy.m     exampleWrapper.h   exampleWrapper.mm &lt;/div&gt;

&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I am curious if anyone can guide me to either 1) documentation that explains what my next steps should be in the process of incorporating my c code into my objc code. or 2) provide a brief response that might serve as guidance for next steps&lt;/div&gt;

&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Thanks in advance for any help you might provide. &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Gregory&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;
&lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431336&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Swig-%3A-Objective-C-%3A-Documentation-and-Next-Steps-tp26431336p26431336.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26430425</id>
	<title>Re: SWIG &lt;-&gt; Ruby 1.9.1 - std::fstream - program	termination</title>
	<published>2009-11-19T09:18:49Z</published>
	<updated>2009-11-19T09:18:49Z</updated>
	<author>
		<name>Sören Freudiger-2</name>
	</author>
	<content type="html">&lt;META HTTP-EQUIV=&quot;Content-Type&quot; CONTENT=&quot;text/html; charset=iso-8859-1&quot;&gt;
&lt;html xmlns:v=&quot;urn:schemas-microsoft-com:vml&quot; xmlns:o=&quot;urn:schemas-microsoft-com:office:office&quot; xmlns:w=&quot;urn:schemas-microsoft-com:office:word&quot; xmlns:m=&quot;http://schemas.microsoft.com/office/2004/12/omml&quot; xmlns=&quot;http://www.w3.org/TR/REC-html40&quot;&gt;

&lt;head&gt;

&lt;meta name=Generator content=&quot;Microsoft Word 12 (filtered medium)&quot;&gt;

&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapedefaults v:ext=&quot;edit&quot; spidmax=&quot;1026&quot; /&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapelayout v:ext=&quot;edit&quot;&gt;
  &lt;o:idmap v:ext=&quot;edit&quot; data=&quot;1&quot; /&gt;
 &lt;/o:shapelayout&gt;&lt;/xml&gt;&lt;![endif]--&gt;
&lt;/head&gt;

&lt;body lang=DE link=blue vlink=purple&gt;

&lt;div class=Section1&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;Arghh&amp;#8230; I don&amp;#8217;t know what to do&amp;#8230;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;No it doesn&amp;#8217;t work for 1.8.6 either (Win 2008 Server 64bit.. but
ruby, my dll and swig are pure 32 bit).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;Do I have to include some extra interface file? Do I have to add
some special preprocessor define (in addition to NT=1 and IMPORT)? &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;'&gt;Von:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;'&gt; Sören Freudiger
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430425&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freud@...&lt;/a&gt;] &lt;br&gt;
&lt;b&gt;Gesendet:&lt;/b&gt; Donnerstag, 19. November 2009 13:37&lt;br&gt;
&lt;b&gt;An:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430425&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;swig-user@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Betreff:&lt;/b&gt; Re: [Swig-user] SWIG &amp;lt;-&amp;gt; Ruby 1.9.1 - std::fstream -
program termination&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;Okay, here is some extra info I found out:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;It seems to be a SWIG bug.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;Implementing the function direct via the ruby C-API works fine
(files attached)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;Any idea?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;(I also send an bug report to swig)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;'&gt;Von:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;'&gt; Sören Freudiger
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430425&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freud@...&lt;/a&gt;] &lt;br&gt;
&lt;b&gt;Gesendet:&lt;/b&gt; Donnerstag, 19. November 2009 10:57&lt;br&gt;
&lt;b&gt;An:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430425&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;swig-user@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Betreff:&lt;/b&gt; [Swig-user] SWIG &amp;lt;-&amp;gt; Ruby 1.9.1 - std::fstream - program
termination&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;Hello&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;Again a huge problem with ruby and C++&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;I&amp;#8217;m not sure if this problem is related to SWIG or ruby. But
maybe anyone has a clue how to fix that issue.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;That&amp;#8217;s&amp;#8217; my source code:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span lang=EN-US style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;#include&lt;/span&gt;&lt;span lang=EN-US style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt; &lt;span style='color:#A31515'&gt;&amp;lt;iostream&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span lang=EN-US style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;#include&lt;/span&gt;&lt;span lang=EN-US style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt; &lt;span style='color:#A31515'&gt;&amp;lt;fstream&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span lang=EN-US style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#A31515'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span lang=EN-US style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;void&lt;/span&gt;&lt;span lang=EN-US style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt; &lt;span style='color:#010001'&gt;foo&lt;/span&gt;()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span lang=EN-US style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span lang=EN-US style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp; &lt;span style='color:#010001'&gt;std&lt;/span&gt;::&lt;span style='color:#010001'&gt;ofstream&lt;/span&gt; &lt;span style='color:#010001'&gt;file&lt;/span&gt;(&lt;span style='color:#A31515'&gt;&amp;quot;c:/temp/text.txt&amp;quot;&lt;/span&gt;,
&lt;span style='color:#010001'&gt;std&lt;/span&gt;::&lt;span style='color:#010001'&gt;ios&lt;/span&gt;::&lt;span style='color:#010001'&gt;out&lt;/span&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span lang=EN-US style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp; &lt;span style='color:#010001'&gt;file&lt;/span&gt;&amp;lt;&amp;lt;&lt;span style='color:#A31515'&gt;&amp;quot;hello
world&amp;quot;&lt;/span&gt;&amp;lt;&amp;lt;&lt;span style='color:#010001'&gt;std&lt;/span&gt;::&lt;span style='color:#010001'&gt;endl&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span lang=EN-US style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp; &lt;span style='color:#010001'&gt;file&lt;/span&gt;.&lt;span style='color:#010001'&gt;close&lt;/span&gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;As you can see, really crazy low level programming.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;The swig interface file:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span lang=EN-US style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;%module example&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span lang=EN-US style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;%{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span lang=EN-US style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;#include
&amp;quot;example.h&amp;quot;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span lang=EN-US style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;%}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;%include
&amp;quot;example.h&amp;quot;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:10.0pt;font-family:&quot;Courier New&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;And the problem:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;Platform: Windows (7)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;Compiler: cl from VS 2008&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;Ruby version 1.8.6. everything works quite well&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;Ruby version 1.9.1_p129 (installer) program termination at
file.close()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;Ruby version 1.9.1_p243 (VS 2008 build, 32bit): program
termination at file.close()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;Ruby version 1.9.2. program termination at file.close()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;I tried to debug the problem, but stuck in&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;VS9/VC/Include/fstream&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;Does anyone know about that error and has a workaround?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;Best,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&amp;nbsp;SirAnn&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;
&lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Swig-user mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430425&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Swig-user@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/swig-user&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/swig-user&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/swig-user-f3366.html&quot; embed=&quot;fixTarget[3366]&quot; target=&quot;_top&quot; &gt;swig-user&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/how-to-wrap-a-complex-c-strtuct-to-python-tp26421740p26430425.html" />
</entry>

</feed>
