操作系统:Windows 7 x64
R安装:2.15.1 x64
Cplex instalation:Cplex Studio Academic 124(32位和64位)
我安装了Rtools,我有一个独立的cygwin安装,包含所有必需的软件包。我也有MikTex安装...
我设置了以下环境标志......
CPLEX_PATH=C:\Program Files\IBM\ILOG\CPLEX_Studio_Academic124
CPLEX_STUDIO_DIR=C:\Program Files\IBM\ILOG\CPLEX_Studio_Academic124
CPLEX_STUDIO_LIB32=C:\Program Files (x86)\IBM\ILOG\CPLEX_Studio_Academic124\opl\bin\x86_win32;C:\Program Files (x86)\IBM\ILOG\CPLEX_Studio_Academic124\opl\oplide\;C:\Program Files (x86)\IBM\ILOG\CPLEX_Studio_Academic124\cplex\bin\x86_win32;C:\Program Files (x86)\IBM\ILOG\CPLEX_Studio_Academic124\cpoptimizer\bin\x86_win32
CPLEX_STUDIO_LIB64=C:\Program Files\IBM\ILOG\CPLEX_Studio_Academic124\opl\bin\x64_win64;C:\Program Files\IBM\ILOG\CPLEX_Studio_Academic124\opl\oplide\;C:\Program Files\IBM\ILOG\CPLEX_Studio_Academic124\cplex\bin\x64_win64;C:\Program Files\IBM\ILOG\CPLEX_Studio_Academic124\cpoptimizer\bin\x64_win64
然后当我在R中运行install命令时,我得到以下错误
> install.packages("c:/cplexAPI_1.2.2.tar.gz", type="source")
Installing package(s) into ‘C:/Users/root/Documents/R/win-library/2.15’
(as ‘lib’ is unspecified)
inferring 'repos = NULL' from the file name
* installing *source* package 'cplexAPI' ...
** package 'cplexAPI' successfully unpacked and MD5 sums checked
** libs
*** arch - i386
cygwin warning:
MS-DOS style path detected: C:/PROGRA~1/R/R-215~1.1/etc/i386/Makeconf
Preferred POSIX equivalent is: /cygdrive/c/PROGRA~1/R/R-215~1.1/etc/i386/Makeconf
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
gcc -I"C:/PROGRA~1/R/R-215~1.1/include" -DNDEBUG -g -D_R_=1 -DUSE_R=1 -I"C:\Program Files\IBM\ILOG\CPLEX_Studio_Academic124\cplex\include" -O3 -Wall -std=gnu99 -mtune=core2 -c cplexAPI.c -o cplexAPI.o
gcc -I"C:/PROGRA~1/R/R-215~1.1/include" -DNDEBUG -g -D_R_=1 -DUSE_R=1 -I"C:\Program Files\IBM\ILOG\CPLEX_Studio_Academic124\cplex\include" -O3 -Wall -std=gnu99 -mtune=core2 -c cplexR.c -o cplexR.o
gcc -I"C:/PROGRA~1/R/R-215~1.1/include" -DNDEBUG -g -D_R_=1 -DUSE_R=1 -I"C:\Program Files\IBM\ILOG\CPLEX_Studio_Academic124\cplex\include" -O3 -Wall -std=gnu99 -mtune=core2 -c cplex_checkAPI.c -o cplex_checkAPI.o
gcc -I"C:/PROGRA~1/R/R-215~1.1/include" -DNDEBUG -g -D_R_=1 -DUSE_R=1 -I"C:\Program Files\IBM\ILOG\CPLEX_Studio_Academic124\cplex\include" -O3 -Wall -std=gnu99 -mtune=core2 -c cplex_longparamAPI.c -o cplex_longparamAPI.o
gcc -I"C:/PROGRA~1/R/R-215~1.1/include" -DNDEBUG -g -D_R_=1 -DUSE_R=1 -I"C:\Program Files\IBM\ILOG\CPLEX_Studio_Academic124\cplex\include" -O3 -Wall -std=gnu99 -mtune=core2 -c init.c -o init.o
gcc -shared -s -static-libgcc -o cplexAPI.dll tmp.def cplexAPI.o cplexR.o cplex_checkAPI.o cplex_longparamAPI.o init.o -LC:\Program Files (x86)\IBM\ILOG\CPLEX_Studio_Academic124 -LC:\Program Files\IBM\ILOG\CPLEX_Studio_Academic124\opl\bin\x64_win64;C:\Program Files\IBM\ILOG\CPLEX_Studio_Academic124\opl\oplide\;C:\Program Files\IBM\ILOG\CPLEX_Studio_Academic124\cplex\bin\x64_win64;C:\Program Files\IBM\ILOG\CPLEX_Studio_Academic124\cpoptimizer\bin\x64_win64 -lm -lcplex124 -LC:/PROGRA~1/R/R-215~1.1/bin/i386 -lR
c:/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lcplex124
collect2: ld returned 1 exit status
ERROR: compilation failed for package 'cplexAPI'
* removing 'C:/Users/root/Documents/R/win-library/2.15/cplexAPI'
Warning messages:
1: running command 'C:/PROGRA~1/R/R-215~1.1/bin/x64/R CMD INSTALL -l "C:/Users/root/Documents/R/win-library/2.15" "c:/cplexAPI_1.2.2.tar.gz"' had status 1
2: In install.packages("c:/cplexAPI_1.2.2.tar.gz", type = "source") :
installation of package ‘c:/cplexAPI_1.2.2.tar.gz’ had non-zero exit status
我不确定我做错了什么或我错过了什么