[Top][All Lists]

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

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

From: Andrew Makhorin
Subject: Re: [Help-glpk] VBA/dll for Excel
Date: Wed, 19 Mar 2008 10:47:18 +0300

> 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.

reply via email to

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