help-glpk
[Top][All Lists]
Advanced

[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


From: Nigel Galloway
Subject: Re: [Help-glpk] [Fwd: Makefile for MinGW on Windows 7/8 for 32bit/64bit architectures]
Date: Fri, 08 May 2015 06:18:39 -0700

The reply I gave to David suggested the following, assuming you have
MinGW and msys installed, perhaps you could indicate which step fails
for you and how.

Unpack glpk_4_55 distribution and open an msys terminal in the top
directory.

# Create suitable Makefiles
./configure

# Build glpk using these Makefiles
make

# 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

# Install
copy src/glpk.h, glpk.dll, glpk.lib wherever you want them

# Test
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

-- 
  Nigel Galloway
  address@hidden

On Mon, May 4, 2015, at 06:08 AM, Jesus wrote:
> Hi,
> 
> I was just following this thread but can't find any connection between 
> the doubt submitted my David (I'm experiencing something similar) and 
> the answer by Nigel.
> 
> I get to compile .o files with gcc but I can't execute them anyhow: is 
> there a way to create .exe files that can run on Win, just as glpsol 
> does? (btw, when I try to create the glpsol.exe (as a test) from gcc, 
> the .exe file generated from gcc can't run in Windows, and other .exe 
> files I generate from .c files run perfectly.
> 
> I don't know if I'm missing some important linking or so. (The point 
> mentioned in the manual regarding glpk.h was succesfully solved and that 
> reference seems to be corrcetly included, since gcc doesn't show any 
> error anymore.)
> 
> Thanks,

-- 
http://www.fastmail.com - Same, same, but different...




reply via email to

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