问题
I am trying to link R, version 3.2.0, with CPLEX. I have used the following commands to install "cplexAPI" package:
1- install.Rtools()
2- install.packages("cplexAPI")
I have installed Rtools successfully but I am getting an error saying "ilcplex/cplex.h: No such file or directory" in "cplexAPI" installation.
Could you please help me out here?
回答1:
You can install cplexAPI manually:
R CMD INSTALL --configure-args=" \
--with-cplex-include=/path/to/cplex_include/dir \
--with-cplex-lib=/path/to/cplex_lib/dir" cplexAPI_x.x.x.tar.gz
Few other options can be found here. You can also add Cplex /include and /lib to your PATH if you use GNU/Linux. Keep in mind that Cplex has cplex
(mostly for C) and concert
(for C++) directories but it looks like you need just cplex
directory.
来源:https://stackoverflow.com/questions/34749293/r-interface-with-cplex