Do you really still use jump marks?
A example how you can dynamically load a Libary can you find here:
http://www.delphipraxis.net/175591-d...ml#post1220503
Edit1:
Btw, you have to link external Posts:
http://forum.delphi-treff.de/index.p...threadID=59293
Edit2:
Delphi-Quellcode:
program GurobiTest;
{$APPTYPE CONSOLE}
uses System.SysUtils, Windows;
//label QUIT;
type
pAChar = pAnsiChar;
GRBenv = pointer;
GRBmodel = pointer;
var
h: HMODULE;
err: integer;
grEnv: GRBenv;
grLp: GRBmodel;
GRBloadenv:
function(
var envP:GRBenv; logfilename:pAChar):integer;
stdcall;
GRBreadmodel:
function(env:GRBenv; filename:pAChar;
var mp:GRBmodel):integer;
stdcall;
GRBoptimize:
function(model:GRBmodel):integer;
stdcall;
begin;
h := LoadLibrary('
C:/gurobi550/win64/bin/gurobi55.dll');
if h = 0
then begin;
ShowMessage('
Cannot load dll');
Exit;
end;
GRBloadenv := GetProcAddress(h,'
GRBloadenv');
GRBreadmodel := GetProcAddress(h,'
GRBreadmodel');
GRBoptimize := GetProcAddress(h,'
GRBoptimize');
if Assigned(GRBloadenv)
then begin;
err := GRBloadenv(grEnv, '
gurobi.log');
if err <> 0
then
//MessageBox?
end;
if Assigned(GRBreadmodel)
then begin;
err := GRBreadmodel(grEnv, '
ALUAM.mps', grLp);
if err <> 0
then
//MessageBox?
end;
if Assigned(GRBoptimize)
then begin;
err := GRBoptimize(grLp);
if err <> 0
then
//MessageBox?
end;
FreeLibrary(h);
end.
-->not testet