Hi.<br><br>I&#39;m trying to solve a problem using glpk as a solver. I changed the Makefile provided in the &quot;example&quot; folder of FlopCpp (&quot;FlopC++-1.1.2/FlopCpp/examples&quot;).<br><br>I changed the following lines in the Makefile:<br>
<br>marcos@dell:~/Downloads/pacotes/FlopC++-1.1.2/FlopCpp/examples$ cat Makefile<br># Copyright (C) 2006 International Business Machines and others.<br># All Rights Reserved.<br># This file is distributed under the Common Public License.<br>
<br># $Id: Makefile.in 726 2006-04-17 04:16:00Z andreasw $<br><br>##########################################################################<br>#    You can modify this example makefile to fit for your own program.   #<br>
#    Usually, you only need to change the five CHANGEME entries below.   #<br>##########################################################################<br><br># To compile other examples, either changed the following line, or<br>
# add the argument EXNAME=example_name to make<br>EXNAME = usahlp<br><br># CHANGEME: This should be the name of your executable<br>EXE = $(EXNAME)<br><br># CHANGEME: Here is the name of all object files corresponding to the source<br>
#           code that you wrote in order to define the problem statement<br>OBJS =  $(EXNAME).o<br><br># CHANGEME: Additional libraries<br>ADDLIBS = -L/home/marcos/Downloads/pacotes/FlopC++-1.1.2/Osi/lib/ -lOsiGlpk -lOsi -lglpk<br>
<br># CHANGEME: Additional flags for compilation (e.g., include flags)<br>ADDINCFLAGS = -I../../include -I/home/marcos/Downloads/pacotes/FlopC++-1.1.2/Osi/src/OsiGlpk<br><br># CHANGEME: Directory to the sources for the (example) problem definition<br>
# files<br>SRCDIR = .<br><br>I can compile and link the program, but when I try to execute the program I get the following error:<br><br>marcos@dell:~/Downloads/pacotes/FlopC++-1.1.2/FlopCpp/examples$ make<br>g++ -O3 -pipe -DNDEBUG -pedantic-errors -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-long-long   -DFLOPCPP_BUILD `PKG_CONFIG_PATH=/home/marcos/Downloads/pacotes/FlopC++-1.1.2/lib/pkgconfig:/home/marcos/Downloads/pacotes/FlopC++-1.1.2/share/pkgconfig: /usr/bin/pkg-config --cflags flopcpp osi-cbc osi-clp` -I../../include -I/home/marcos/Downloads/pacotes/FlopC++-1.1.2/Osi/src/OsiGlpk -c -o usahlp.o `test -f &#39;usahlp.cpp&#39; || echo &#39;./&#39;`usahlp.cpp<br>
usahlp.cpp: Na função ‘int main(int, char**)’:<br>usahlp.cpp:12:12: aviso: unused variable ‘k’ [-Wunused-variable]<br>usahlp.cpp:37:22: aviso: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]<br>
usahlp.cpp:49:29: aviso: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]<br>usahlp.cpp:58:29: aviso: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]<br>
usahlp.cpp:66:28: aviso: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]<br>bla=;\<br>    for file in usahlp.o; do bla=&quot;$bla `echo $file`&quot;; done; \<br>
    g++ -Wl,--rpath -Wl,/home/marcos/Downloads/pacotes/FlopC++-1.1.2/lib -O3 -pipe -DNDEBUG -pedantic-errors -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-long-long   -DFLOPCPP_BUILD -o usahlp $bla `PKG_CONFIG_PATH=/home/marcos/Downloads/pacotes/FlopC++-1.1.2/lib/pkgconfig:/home/marcos/Downloads/pacotes/FlopC++-1.1.2/share/pkgconfig: /usr/bin/pkg-config --libs flopcpp osi-cbc osi-clp` -L/home/marcos/Downloads/pacotes/FlopC++-1.1.2/Osi/lib/ -lOsiGlpk -lOsi -lglpk<br>
marcos@dell:~/Downloads/pacotes/FlopC++-1.1.2/FlopCpp/examples$ ./usahlp<br>./usahlp: error while loading shared libraries: libOsiGlpk.so.1: cannot open shared object file: No such file or directory<br>marcos@dell:~/Downloads/pacotes/FlopC++-1.1.2/FlopCpp/examples$ <br>
<br>Could you please help me to solve this problem? I don&#39;t understand why the library is not found.<br><br>Thank you.<br><br>Marcos<br>