0

在 linux, CentOS 6.4 (Final) 上编译 scipsuite 时,我收到以下错误:

-> compiling obj/O.linux.x86_64.gnu.opt/lib/objscip/objmessagehdlr.o
-> compiling obj/O.linux.x86_64.gnu.opt/lib/objscip/objnodesel.o
-> compiling obj/O.linux.x86_64.gnu.opt/lib/objscip/objpresol.o
-> compiling obj/O.linux.x86_64.gnu.opt/lib/objscip/objpricer.o
-> compiling obj/O.linux.x86_64.gnu.opt/lib/objscip/objprobdata.o
-> compiling obj/O.linux.x86_64.gnu.opt/lib/objscip/objprop.o
-> compiling obj/O.linux.x86_64.gnu.opt/lib/objscip/objreader.o
-> compiling obj/O.linux.x86_64.gnu.opt/lib/objscip/objrelax.o
-> compiling obj/O.linux.x86_64.gnu.opt/lib/objscip/objsepa.o
-> compiling obj/O.linux.x86_64.gnu.opt/lib/objscip/objvardata.o
-> generating library lib/libobjscip-3.2.0.linux.x86_64.gnu.opt.a
-> compiling obj/O.linux.x86_64.gnu.opt/lib/lpi/lpi_spx.o
In file included from lib/spxinc/basevectors.h:30,
                 from lib/spxinc/spxlpbase.h:34,
                 from lib/spxinc/spxlp.h:24,
                 from lib/spxinc/spxsolver.h:30,
                 from src/lpi/lpi_spx.cpp:76:
lib/spxinc/rational.h:133: error: only declarations of constructors can be ‘explicit’
lib/spxinc/rational.h:136: error: only declarations of constructors can be ‘explicit’
In file included from src/lpi/lpi_spx.cpp:76:
lib/spxinc/spxsolver.h: In member function ‘void     soplex::SPxSolver::setOutstream(soplex::SPxOut&)’:
lib/spxinc/spxsolver.h:383: error: ‘template<class R> class     soplex::SPxLPBase’ used without template parameters
make[1]: *** [obj/O.linux.x86_64.gnu.opt/lib/lpi/lpi_spx.o] Error 1

gcc 版本是 4.4.7

我试过了:

make
make LEGACY=true
make ZLIB=false GMP=false READLINE=false LPSOPT=opt-gccold OPT=opt-gccold

我已经安装了 GMP、ZLIB 和 READLINE 库,以及它们的开发库。

有什么建议么?

4

1 回答 1

0

如果你想编译 SoPlex,gcc 4.4.7你肯定需要设置LEGACY=true(在 SCIP 中你需要指定SPX_LEGACY=true)。如果您在 SCIP 优化套件(推荐)中编译代码,该选项LEGACY=true将相应地编译 SCIP 和 SoPlex。

关于其他错误spxsolver.h:在第 383 行,请替换

SPxLPBase::spxout = &newOutstream;

SPxLP::spxout = &newOutstream;

显然,如果没有指定模板说明符(实际上是) ,较新版本的gcc不会抱怨这种用法。SPxLPSPxLPBase <Real>

于 2015-07-06T08:56:29.063 回答