From: Bob T. <Bob...@co...> - 2009-02-20 17:09:44
|
I'm having some troubles with getting OBDotNet to work and am hoping for some help. I have OpenBable-2.2.0 installed and am using VS 2008 sp1. I made the simplest program using System; using OpenBabel; namespace OpenBabelTesting { class Program { static void Main(string[] args) { OBConversion obc = new OBConversion(); } } } and when I run it I get this exception: System.TypeInitializationException was unhandled Message="The type initializer for 'OpenBabel.openbabelPINVOKE' threw an exception." Source="OBDotNet" TypeName="OpenBabel.openbabelPINVOKE" StackTrace: at OpenBabel.openbabelPINVOKE.new_OBConversion__SWIG_2() at OpenBabel.OBConversion..ctor() at OpenBabelTesting.Program.Main(String[] args) in C:\Projects\Constellation.HTS\ChemRegistration\OpenBabelTesting\Program.cs:line 10 at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException: System.TypeInitializationException Message="The type initializer for 'SWIGExceptionHelper' threw an exception." Source="OBDotNet" TypeName="SWIGExceptionHelper" StackTrace: at OpenBabel.openbabelPINVOKE.SWIGExceptionHelper..ctor() at OpenBabel.openbabelPINVOKE..cctor() InnerException: System.DllNotFoundException Message="Unable to load DLL 'openbabel': The specified module could not be found. (Exception from HRESULT: 0x8007007E)" Source="OBDotNet" TypeName="" StackTrace: at OpenBabel.openbabelPINVOKE.SWIGExceptionHelper.SWIGRegisterExceptionCallbacks_openbabel(ExceptionDelegate applicationDelegate, ExceptionDelegate arithmeticDelegate, ExceptionDelegate divideByZeroDelegate, ExceptionDelegate indexOutOfRangeDelegate, ExceptionDelegate invalidCastDelegate, ExceptionDelegate invalidOperationDelegate, ExceptionDelegate ioDelegate, ExceptionDelegate nullReferenceDelegate, ExceptionDelegate outOfMemoryDelegate, ExceptionDelegate overflowDelegate, ExceptionDelegate systemExceptionDelegate) at OpenBabel.openbabelPINVOKE.SWIGExceptionHelper..cctor() InnerException: I thought it had something to do with openbabel.dll but I could not add it as a reference to my project or the GAC. Any ideas? Thanks in advance, Bob |
From: Geoffrey H. <ge...@ge...> - 2009-03-04 18:53:32
|
On Feb 20, 2009, at 10:35 AM, Bob Trucchi wrote: > I'm having some troubles with getting OBDotNet to work and am hoping > for some help. I have OpenBable-2.2.0 installed and am using VS 2008 > sp1. I made the simplest program Have you tried 2.2.1? The OBDotNet code has been significantly improved. Cheers, -Geoff |
From: Noel O'B. <bao...@gm...> - 2009-03-04 20:35:55
|
Hello Bob, I've just written some installation instructions for OBDotNet. Please find them at http://openbabel.org/wiki/OBDotNet Let us know if you have any further problems. - Noel 2009/2/20 Bob Trucchi <Bob...@co...>: > I'm having some troubles with getting OBDotNet to work and am hoping for > some help. I have OpenBable-2.2.0 installed and am using VS 2008 sp1. I made > the simplest program > > using System; > using OpenBabel; > > namespace OpenBabelTesting > { > class Program > { > static void Main(string[] args) > { > OBConversion obc = new OBConversion(); > } > > } > } > and when I run it I get this exception: > System.TypeInitializationException was unhandled > Message="The type initializer for 'OpenBabel.openbabelPINVOKE' threw an > exception." > Source="OBDotNet" > TypeName="OpenBabel.openbabelPINVOKE" > StackTrace: > at OpenBabel.openbabelPINVOKE.new_OBConversion__SWIG_2() > at OpenBabel.OBConversion..ctor() > at OpenBabelTesting.Program.Main(String[] args) in > C:\Projects\Constellation.HTS\ChemRegistration\OpenBabelTesting\Program.cs:line > 10 > at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) > at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence > assemblySecurity, String[] args) > at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() > at System.Threading.ThreadHelper.ThreadStart_Context(Object state) > at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, > ContextCallback callback, Object state) > at System.Threading.ThreadHelper.ThreadStart() > InnerException: System.TypeInitializationException > Message="The type initializer for 'SWIGExceptionHelper' threw an exception." > Source="OBDotNet" > TypeName="SWIGExceptionHelper" > StackTrace: > at OpenBabel.openbabelPINVOKE.SWIGExceptionHelper..ctor() > at OpenBabel.openbabelPINVOKE..cctor() > InnerException: System.DllNotFoundException > Message="Unable to load DLL 'openbabel': The specified module could not be > found. (Exception from HRESULT: 0x8007007E)" > Source="OBDotNet" > TypeName="" > StackTrace: > at > OpenBabel.openbabelPINVOKE.SWIGExceptionHelper.SWIGRegisterExceptionCallbacks_openbabel(ExceptionDelegate > applicationDelegate, ExceptionDelegate arithmeticDelegate, ExceptionDelegate > divideByZeroDelegate, ExceptionDelegate indexOutOfRangeDelegate, > ExceptionDelegate invalidCastDelegate, ExceptionDelegate > invalidOperationDelegate, ExceptionDelegate ioDelegate, ExceptionDelegate > nullReferenceDelegate, ExceptionDelegate outOfMemoryDelegate, > ExceptionDelegate overflowDelegate, ExceptionDelegate > systemExceptionDelegate) > at OpenBabel.openbabelPINVOKE.SWIGExceptionHelper..cctor() > InnerException: > > I thought it had something to do with openbabel.dll but I could not add it > as a reference to my project or the GAC. Any ideas? > > Thanks in advance, > Bob > > > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise > -Strategies to boost innovation and cut costs with open source participation > -Receive a $600 discount off the registration fee with the source code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > > |
From: Charlie Z. <zh....@gm...> - 2009-04-04 23:54:41
|
Try putting the openbabel.dll and other files into system32 folder, that perhaps works. You'd better use Dependency Walker to check problems for the DLLs(OBDotNet.dll/ openbabel.dll) to work. Download the free tool at http://www.dependencywalker.com/ I have found the VC 2005 Redistributable Package is required on a non-development machine by this way. Charlie Bob Trucchi wrote: > > I'm having some troubles with getting OBDotNet to work and am hoping for > some help. I have OpenBable-2.2.0 installed and am using VS 2008 sp1. I > made the simplest program > > using System; > using OpenBabel; > > namespace OpenBabelTesting > { > class Program > { > static void Main(string[] args) > { > OBConversion obc = new OBConversion(); > } > > } > } > and when I run it I get this exception: > System.TypeInitializationException was unhandled > Message="The type initializer for 'OpenBabel.openbabelPINVOKE' threw an > exception." > Source="OBDotNet" > TypeName="OpenBabel.openbabelPINVOKE" > StackTrace: > at OpenBabel.openbabelPINVOKE.new_OBConversion__SWIG_2() > at OpenBabel.OBConversion..ctor() > at OpenBabelTesting.Program.Main(String[] args) in > C:\Projects\Constellation.HTS\ChemRegistration\OpenBabelTesting\Program.cs:line > 10 > at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) > at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence > assemblySecurity, String[] args) > at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() > at System.Threading.ThreadHelper.ThreadStart_Context(Object state) > at System.Threading.ExecutionContext.Run(ExecutionContext > executionContext, ContextCallback callback, Object state) > at System.Threading.ThreadHelper.ThreadStart() > InnerException: System.TypeInitializationException > Message="The type initializer for 'SWIGExceptionHelper' threw an > exception." > Source="OBDotNet" > TypeName="SWIGExceptionHelper" > StackTrace: > at OpenBabel.openbabelPINVOKE.SWIGExceptionHelper..ctor() > at OpenBabel.openbabelPINVOKE..cctor() > InnerException: System.DllNotFoundException > Message="Unable to load DLL 'openbabel': The specified module could not be > found. (Exception from HRESULT: 0x8007007E)" > Source="OBDotNet" > TypeName="" > StackTrace: > at > OpenBabel.openbabelPINVOKE.SWIGExceptionHelper.SWIGRegisterExceptionCallbacks_openbabel(ExceptionDelegate > applicationDelegate, ExceptionDelegate arithmeticDelegate, > ExceptionDelegate divideByZeroDelegate, ExceptionDelegate > indexOutOfRangeDelegate, ExceptionDelegate invalidCastDelegate, > ExceptionDelegate invalidOperationDelegate, ExceptionDelegate ioDelegate, > ExceptionDelegate nullReferenceDelegate, ExceptionDelegate > outOfMemoryDelegate, ExceptionDelegate overflowDelegate, ExceptionDelegate > systemExceptionDelegate) > at OpenBabel.openbabelPINVOKE.SWIGExceptionHelper..cctor() > InnerException: > > I thought it had something to do with openbabel.dll but I could not add it > as a reference to my project or the GAC. Any ideas? > > Thanks in advance, > Bob > > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, > CA > -OSBC tackles the biggest issue in open source: Open Sourcing the > Enterprise > -Strategies to boost innovation and cut costs with open source > participation > -Receive a $600 discount off the registration fee with the source code: > SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > > -- View this message in context: http://www.nabble.com/Problems-with-OBDotNet-tp22334953p22889053.html Sent from the openbabel-scripting mailing list archive at Nabble.com. |