[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] Fwd: build glpk.dll for C# so that I can call it from VS
Re: [Help-glpk] Fwd: build glpk.dll for C# so that I can call it from VS2013 on win7.
Thu, 17 Dec 2015 07:45:12 +0100
>> A reference to "C:\myPATH\glpk_4_57.dll" could not be added.
>> Please make sure that the file is accessible and that is a vaid assembly or
>> COM component.
glpk_4_57.dll is not an assembly but a native library.
You have to ensure that it is in the library search path.
You could copy the dlls needed in the post build phase, see
Gesendet: Donnerstag, 17. Dezember 2015 um 05:13 Uhr
Von: "usa usa"
An: "Heinrich Schuchardt" <address@hidden>, address@hidden
Betreff: Fwd: [Help-glpk] build glpk.dll for C# so that I can call it from
VS2013 on win7.
Sorry, A typo in my last email.
GLPK version is 4.57.
---------- Forwarded message ----------
From: usa usa <address@hidden>
Date: Wed, Dec 16, 2015 at 11:08 PM
Subject: Re: [Help-glpk] build glpk.dll for C# so that I can call it from
VS2013 on win7.
To: Heinrich Schuchardt <address@email@example.com]>
I have downdloaded GPLK for C# from
I have installed it and passed all install test on win 7.
GLPK version is 4.57
Now, I am trying to write a simple C# program from Visual Studio 2013 as
static void Main(string args)
Console.WriteLine("GLPK " + GLPK.glp_version()); // Got exception
But, I got exception:
An unhandled exception of type 'System.TypeInitializationException' occurred in
Additional information: The type initializer for 'org.gnu.glpk.GLPK' threw an
>From the README file of the package, I saw that
"For building and running your own application you will need the following files
from the w64 directory:
* glpk\_?\_??.dll - the GLPK native library
* libglpk\_cli\_native.dll - the GLPK for C#/CLI native library
* libglpk\_cli.dll - the GLPK for C#/CLI assembly"
When I was tryingto add them as reference to my C# prpject , I got:
A reference to "C:\myPATH\glpk_4_57.dll" could not be added.
Please make sure that the file is accessible and that is a vaid assembly or COM
i got the same error for libglpk_cli_native.dll.
Only libglpk_cli.dll can be added.
Do I miss something here ?
Why the installation test can be apssed (printed out GLPK version) but I cannot
run the same program from Visual Studion 2013 ?
Any help would be appreciated.