[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] how to do to gcc compiler "see" glpk.h and the libraries
From: |
Andrew Makhorin |
Subject: |
Re: [Help-glpk] how to do to gcc compiler "see" glpk.h and the libraries? |
Date: |
Sun, 26 Aug 2012 11:32:46 +0400 |
> thanks for your response.
> I do not think this solves my problem.
> When I install glpk manually, the file glpk.h will be in the subdirectory
> /usr/local/include and the libraries will be at /usr/local/lib.
You may specify any other directory rather than /usr/local on
configuring the package; see file INSTALL for details.
>
> If I try to run the file sample.c in the subdirectory /glpk4.47/examples
> the compiler can not "see" the file glpk.h and the libraries
> libglpk.a, etc.
>
> I need to add a path together with the command gcc. But, I do not know
> how to do.
>
Try
gcc -I/usr/local/include -lglpk foo.c
or
gcc -I/usr/local/include -L/usr/local/lib -lglpk foo.c