从源代码ubuntu编译和构建lp_solve

时间:2017-06-27 05:03:57

标签: ubuntu lpsolve

我正在使用ubuntu机器,我已经下载了lp_solve源代码(lp_solve_5.5.2.5_source.tar.gz)并将其解压缩。然后我将命令提示符cd到路径lp_solve_5.5 / lpsolve55。 然后我运行命令

./ccc

然后我收到此错误并创建了空bin文件夹。

In file included from ../lp_SOS.c:3:0:
../shared/commonlib.h:88:24: error: expected identifier or ‘(’ before numeric constant
   #define FALSE        0
                        ^
In file included from ../lp_utils.c:4:0:
../shared/commonlib.h:88:24: error: expected identifier or ‘(’ before numeric constant
   #define FALSE        0
                        ^
cc: error: lp_MDO.o: No such file or directory
cc: error: lp_crash.o: No such file or directory
cc: error: lp_wlp.o: No such file or directory
cc: error: lp_matrix.o: No such file or directory
cc: error: lp_mipbb.o: No such file or directory
cc: error: lp_MPS.o: No such file or directory
cc: error: lp_params.o: No such file or directory
cc: error: lp_presolve.o: No such file or directory
cc: error: lp_price.o: No such file or directory
cc: error: lp_pricePSE.o: No such file or directory
cc: error: lp_scale.o: No such file or directory
cc: error: lp_simplex.o: No such file or directory
cc: error: lp_SOS.o: No such file or directory

我不熟悉Ubuntu。我将感激你,如果有人能帮助我解决这个问题。我想在我的项目中使用CFM-ID算法。要使用它,我必须正确安装lp_solve。谢谢

1 个答案:

答案 0 :(得分:0)

我遇到了同样的问题,这篇文章帮助了我:https://groups.google.com/forum/#!topic/prismmodelchecker/gtVatHAir90

  1. 下载补丁https://groups.google.com/group/prismmodelchecker/attach/3586984674e863/fix-lpsolve-compilation.patch?part=0.1&authuser=0&view=1

  2. 将带有patch < yourpath/fix-lpsolve-compilation.patch的修补程序应用于ccc文件的目录中。

  3. 但是,由于修补程序适用于某些PRISM版本,因此无法找到要修补的正确文件 - 您必须指定相应的文件。例如

    can't find file to patch at input line 57
    Perhaps you used the wrong -p or --strip option?
    The text leading up to this was:
    --------------------------
    |Index: prism/ext/lpsolve55/src/lp_solve_5.5/lpsolve55/ccc
    |===================================================================
    |--- prism/ext/lpsolve55/src/lp_solve_5.5/lpsolve55/ccc (revision 11215)
    |+++ prism/ext/lpsolve55/src/lp_solve_5.5/lpsolve55/ccc (revision 11216)
    --------------------------
    File to patch:
    

    您输入ccc。你不需要让所有这些都正确(ccc.osx等),所以你可以跳过所有,除了&#34;对&#34; CCC