[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] VBA/dll for Excel

From: glpk xypron
Subject: Re: [Help-glpk] VBA/dll for Excel
Date: Wed, 19 Mar 2008 16:22:43 +0100

Hello Andrew,

I can understand that You want to keep the core of GLPK independent of 
operating system considerations.

Writing a wrapper seems easy to do. Care has to be given to glp_term_hook 
because the hook function will be __stdcall. The wrapper will have to alloc 
memory to build a info structure and pass a wrapper function as hook function. 
An extra function will be needed to free the the info structure.

Would You put the wrapper C-code and a batch file to compile it into Your 

Best regards


-------- Original-Nachricht --------
> Datum: Wed, 19 Mar 2008 10:47:18 +0300
> Von: Andrew Makhorin <address@hidden>
> An: "glpk xypron" <address@hidden>
> CC: "Meketon, Marc" <address@hidden>, address@hidden, address@hidden
> Betreff: Re: [Help-glpk] VBA/dll for Excel

> > the problem is due to GLPK being compiled with __cdecl calling
> > convention instead of __stdcall calling convention.
> > References:
> >
> >
> > I have recompiled the DLL with compiler switch /Gz
> > Makefile_VC6_MT_DLL:
> > CFLAGS = /nologo /W3 /DGLP_TLS_CONFIG=2 /Gz
> > This gave me a lot of errors of type:
> > ..\src\glplpx05.c(725) : error C2440: 'Function': 'int (__stdcall
> > *)(const void *,const void *)' cannot be converted to 'int (__cdecl
> > *)(cons
> > t void *,const void *)'
> > All functions passed to qsort must be explicitly declared as __cdecl,
> I think that introducing calling convention attributes in the glpk
> code is not a good idea (even if such attributes would be guarded with
> ifdef's), because this is a non-standard language feature.
> It seems to me that a much better way is to have wrapper routines,
> say, in a separate dll.

Psst! Geheimtipp: Online Games kostenlos spielen bei den GMX Free Games!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]