Search code examples
linuxcclpsolve

lpsolve library dynamically linking


the lpsolve library has a script to build a demo.c file.

#This script expects to be located in a subdirectory of a subdirectory of the base lpsolve files
cc -DEXPLICIT -I../.. -O3 demo.c explicit.c -lm -ldl -o demoe ../../lpsolve55/liblpsolve55.so
opts='-O3'
opts=''

cc -I../.. $opts demo.c implicit.c -lm -ldl -o demoi ../../lpsolve55/liblpsolve55.a

The name of the file is ccc and the content is displayed above. From Terminal how do you call this script?


Solution

  • You should call this script using

    sh ccc
    

    This information is also contained in file demo/readme.txt:

    To build the program under Linux/Unix, use sh ccc