Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 4 and Visual Studio 2010 > BOOK: Professional IronPython
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional IronPython
This is the forum to discuss the Wrox book Professional IronPython by John Paul Mueller; ISBN: 9780470548592
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional IronPython section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old November 26th, 2010, 07:38 AM
Registered User
 
Join Date: Nov 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default IronPython and .Net Assemblies containing unmanaged code

Hi guys, I have problems referencing a dot net assembly containing unmanaged C++ code (IOError: System.IOException: file does not exist: <path><filename>.dll) As I do not encounter these problems with my pure C# libraries I suspect the reason may be the 'unmanaged' nature of some of my C code. Has anyone encountered similar problems? Does anyone have an idea how to fix this problem? I'd be grateful for any feedback..

Addendum (2010-11-29):

Having done some more analysis on my problem, I feel comfortable in stating that the problem does not seem to stem from the unmanaged nature of some of my C++ code, but rather from use of C++ code in general. No matter how I compile my code (pure dot net, mixed, or 'classic' C++), the libraries can't seem to be referenced using IronPython's clr.AddReferenceToFile("..") command. For C#-authored libraries, by contrast, I don't encounter these problems.

Last edited by quant; November 29th, 2010 at 05:44 AM. Reason: New Insights
Reply With Quote
  #2 (permalink)  
Old March 11th, 2011, 11:57 AM
Wrox Author
Points: 62, Level: 1
Points: 62, Level: 1 Points: 62, Level: 1 Points: 62, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2009
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default IronPython and .Net Assemblies containing unmanaged code

I looked for a quick reply for you in November and didn't find one. Everywhere I looked for an answer seems to indicate that what you're trying to do won't work because IronPython is implemented on top of the Dynamic Language Runtime (DLR). I have a little extra time right now, so I'm trying out some solutions on my own. If I find something for you, I'll let you know. In the meantime, the best answer is to implement your C++ code using a COM interface and interact with it that way. As an alternative, you could access the C++ code using C# and then access the C# code from IronPython. Unfortunately, the multiple layers will almost certainly cause speed and reliability problems. Chapter 6 of the book discusses this sort of problem happening with the Standard Library as well. Some modules are missing because they rely on C code to perform their magic. Perhaps someone else will have a better answer to this question and chime in.

John
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Big limitation in SSIS - No unmanaged code support johnperez BOOK: Professional SQL Server 2005 Integration Services ISBN: 0-7645-8435-9 0 March 28th, 2008 11:58 AM
Managed & Unmanaged Code? code_lover General .NET 0 January 4th, 2007 09:08 AM
Unmanaged to managed code blemos C# 0 December 21st, 2006 07:34 AM
Using XML Schemas in C++ Unmanaged Code RFickling XML 1 June 8th, 2005 08:23 AM
Using ADO.net in unmanaged C++ programs vonlean ADO.NET 0 September 23rd, 2003 10:35 PM



All times are GMT -4. The time now is 08:59 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.