I have some problems with the csharp bindings.

I didn't see any up to date version of OBDotNet so I tried to build it from
the source code.
I am on a windows environment, using visual studio 2008.
I tweaked the default_build.bat file in the windows-vc2008 folder  to be
able to compile everything on my machine (setting the paths to cmake, eigen,
swig and the c# compiler). So far so good, I have a valid .Net dll, and the
openbabel_csharp dll

I tried the basic test example:

            OBConversion obconv = new OBConversion();
            obconv.SetInFormat("smi");
            OBMol mol = new OBMol();
            obconv.ReadString(mol, "CCC");
            System.Console.WriteLine(mol.GetMolWt());

I got an error saying that it couldn't find the openbabelcsharp dll so I
renamed my openbabel_csharp.dll to openbabelcsharp.dll, and this time I had
an "Access Violation Exception".
I tried to create a new project using the .cs files used by obdotnet, and
changing the references to the openbabelcsharp dll in code to
openbabel_csharp. I still have an "Access Violation Exception"

Are the c# bindings still a work in progress? Did I forgot some options in
the default_build.bat file ?

Actually I was hoping the new version of OBDotNet would solve an error I
have on the current version; I am getting an "Access Violation Exception" on
some molecules when I try myOBMol.AddHydrogens(false, true, pH)

Thanks in advance for your replies 
-- 
View this message in context: 
http://forums.openbabel.org/OBDotNet-tp3044429p3044429.html
Sent from the openbabel-devel mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to