1.       I loaded all the .dlls in the executable folder, and also Reference
the OBDotNet.dll in the VS 2015 (C#) within the project, and am getting an
exception

 

Additional information: The type initializer for
'OpenBabel.openbabel_csharpPINVOKE' threw an exception.

 

Example code is below:

 

using System;

using System.Collections.Generic;

using System.Linq;

using System.Threading.Tasks;

using System.Windows.Forms;

using OpenBabel;

 

 

namespace MyConsoleApplication

{

    class Program

    {

        static void Main(string[] args)

        {

            OBConversion obconv = new OBConversion();  //ß Exception thrown
here.

            obconv.SetInFormat("smi");

            OBMol mol = new OBMol();

            obconv.ReadString(mol, "CCC");

            double mowwt = mol.GetMolWt();

            var smowwt = mowwt.ToString();

            MessageBox.Show(smowwt);

        }

    }

}

 

2.       It seems that the .dlls are obfuscated as well, so how open is
OpenBabel?

 

LP

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to