[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] [Fwd: Makefile for MinGW on Windows 7/8 for 32bit/64bit
Re: [Help-glpk] [Fwd: Makefile for MinGW on Windows 7/8 for 32bit/64bit architectures]
Fri, 02 Jan 2015 05:20:42 -0800
Happy new year Y'all
Sorry for the delay, I was away for 6 weeks before xmas. Yes this is good for linking to create static glpk applications. If you want the lib and dll files you must do the following:
Unpack glpk_4_55 distribution and open an msys terminal in the top directory.
# Create suitable Makefiles
# Build glpk using these Makefiles
# Construct a dll
dllwrap --dllname glpk.dll --def w32/glpk_4_55.def src/*.o
# Generate the .lib file
dlltool --def w32/glpk_4_55.def --dllname glpk.dll --output-lib glpk.lib
copy src/glpk.h, glpk.dll, glpk.lib wherever you want them
Change directory to wherever you installed glpk.h, glpk.dll, glpk.lib. Copy glpsol.c and say yacfs.mod from glpk examples.
# Compile glpsol
gcc -I . glpsol.c -o glpsol.exe glpk.lib
# Run glpsol
glpsol --math yacfs.mod
On Fri, Mar 28, 2014, at 08:48 AM, David Romero wrote:
Thanks Nigel. I just did that and it compiled ok. Sorry for asking this, it seems that the solution was obvious...I got the glpsol.exe and the libglpk.a files. I tested the glpsol.exe and it is fine. Now, I wonder, would this .a file be good to link with a gcc-compiled application that would run on Windows (inside msys), or do I need to somehow create .lib/.dll files?
On Fri, Mar 28, 2014 at 8:26 AM, Nigel Galloway <address@hidden>
The easiest way to compile GLPK using MinGW is to also install MSYS.
MSYS provides the gnu make toolchain so you may then compile GLPK as you
do on Linux using the supplied Makefile as is.
On Tue, Feb 4, 2014, at 06:30 PM, Andrew Makhorin wrote:
> -------- Forwarded Message --------
> From: David Romero <address@hidden>
> To: address@hidden
> Subject: Makefile for MinGW on Windows 7/8 for 32bit/64bit architectures
> Date: Tue, 4 Feb 2014 13:47:32 -0500
> Dear Developers,
> First, let me thank you for your effort in putting together this tool,
> for free.
> I would like to request, if that is at all possible, to include with the
> GLPK distributions somewhat detailed instructions about building GLPK
> from source using MinGW and/or MinGW64 under Windows 7/8.
> I am not a computer expert, but can find my way around the computer, so
> I guess I could be an "average user" case. I used MinGW to compile GLPK
> from source, and the resulting executable GLPSOL works perfectly.
> However, when I tried to use GLPK as a library, even though the
> compilation goes through, the resulting executable crashes every time I
> call it, and I haven't been able to find what the problem is.
> I am wondering if this is an issue with a 32 executable being used in a
> 64 architecture, maybe I am not aware of some 32bit library that I am
> calling inadvertently, or maybe it is a 64 library that I am using from
> my 32bit application.
> I have both MinGW and MinGW64 (the TDM package) in my computer, but only
> MinGW is in the path.
> To get around this issue, I just created a virtual machine (VirtualBox)
> with Linux Mint in it, and I am running GLPK from there. Of course, in
> linux, it compiles ans installs without a hitch. Thanks for that!
> Thanks in advance for any help you can provide. If not able to help me
> in my current situation, at least please consider the building scripts
> for MinGW users in Windows.
> David Romero
> Help-glpk mailing list
http://www.fastmail.fm - IMAP accessible web-mail
http://www.fastmail.com - Choose from over 50 domains or use your own
|[Prev in Thread]
||[Next in Thread]|
- Re: [Help-glpk] [Fwd: Makefile for MinGW on Windows 7/8 for 32bit/64bit architectures],
Nigel Galloway <=