help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] Compiling GLPK with stdcall calling convention


From: Heinrich Schuchardt
Subject: [Help-glpk] Compiling GLPK with stdcall calling convention
Date: Sat, 7 Jan 2017 22:18:32 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0

Hello Andrew,

for Windows 32 two different calling conventions are used: __cdecl and
__stdcall.

To use GLPK in conjunction with 32bit LibreOffice (or OpenOffice) Basic
it is necessary to compile the GLPK library with __stdcall.

Compilation with __stdcall can be achieved by using the /Gz compiler
option for Visual Studio Express C++.

Unfortunately this is not enough. All functions passed to qsort must use
the __cdecl calling convention.

On Github I have set up a repository with a patched GLPK 4.60 which
allows both compiling with __cdecl and with __stdcall:
https://github.com/xypron/glpk/tree/glpk-4.60-stdcall

The essential patch is
https://github.com/xypron/glpk/commit/471b8ee233da57391b0f4401380c0405f7ab2455

It adds a symbol CDECL that is defined in config.h and applied to the
relevant comparison functions.

I have also added a Makefile and build batch file but these are not
essential.

Could you, please, consider adding this CDECL symbol to GLPK 4.61.

---

LibreOffice Basic and OpenOffice Basic support a subset of the Microsoft
VBA language. The essential difference with regards to GLPK is the lack
of the AddressOf operator. Hence hook and callback functions cannot be used.

Best regards

Heinrich Schuchardt



reply via email to

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