Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 4 and Visual Studio 2010 > BOOK: Professional IronPython
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old November 26th, 2010, 08: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 06:44 AM.. Reason: New Insights
  #2 (permalink)  
Old March 11th, 2011, 12:57 PM
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


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 10:08 AM
Unmanaged to managed code blemos C# 0 December 21st, 2006 08: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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.