Hi fellows, I try to link nlopt with Rcpp/RcppArmadillo packages in R. So I follow the instructions on nloptr website ( https://github.com/jyypma/nloptr/blob/master/INSTALL.windows) to first install nlopt from source on windows. However, I encountered the following errors in make. Any help is very much appreciated! Thanks!
make all-recursive make[1]: Entering directory `/c/temp/nlopt-2.4.2' Making all in util make[2]: Entering directory `/c/temp/nlopt-2.4.2/util' /bin/sh ../libtool --tag=CC --mode=compile c:/Rtools/mingw_64/bin/g++ -DHAVE_ CONFIG_H -I. -I.. -I../api -g -O2 -MT mt19937ar.lo -MD -MP -MF .deps/mt19937a r.Tpo -c -o mt19937ar.lo mt19937ar.c libtool: compile: c:/Rtools/mingw_64/bin/g++ -DHAVE_CONFIG_H -I. -I.. -I../api -g -O2 -MT mt19937ar.lo -MD -MP -MF .deps/mt19937ar.Tpo -c mt19937ar.c -o mt1993 7ar.o mt19937ar.c:62:6: error: #error No 32-bit unsigned integer type # error No 32-bit unsigned integer type ^ mt19937ar.c:76:8: error: 'THREADLOCAL' does not name a type static THREADLOCAL uint32_t mt[N]; /* the array for the state vector */ ^ mt19937ar.c:77:8: error: 'THREADLOCAL' does not name a type static THREADLOCAL int mti=N+1; /* mti==N+1 means mt[N] is not initialized */ ^ mt19937ar.c: In function 'void nlopt_init_genrand(long unsigned int)': mt19937ar.c:82:5: error: 'mt' was not declared in this scope mt[0]= s & 0xffffffffUL; ^ mt19937ar.c:83:10: error: 'mti' was not declared in this scope for (mti=1; mti<N; mti++) { ^ mt19937ar.c: At global scope: mt19937ar.c:96:8: error: 'uint32_t' does not name a type static uint32_t nlopt_genrand_int32(void) ^ mt19937ar.c: In function 'double nlopt_genrand_res53()': mt19937ar.c:196:5: error: 'uint32_t' was not declared in this scope uint32_t a=nlopt_genrand_int32()>>5, b=nlopt_genrand_int32()>>6; ^ mt19937ar.c:197:12: error: 'a' was not declared in this scope return(a*67108864.0+b)*(1.0/9007199254740992.0); ^ mt19937ar.c:197:25: error: 'b' was not declared in this scope return(a*67108864.0+b)*(1.0/9007199254740992.0); ^ mt19937ar.c: In function 'int nlopt_iurand(int)': mt19937ar.c:211:33: error: 'nlopt_genrand_int32' was not declared in this scope return(nlopt_genrand_int32() % n); ^ make[2]: *** [mt19937ar.lo] Error 1 make[2]: Leaving directory `/c/temp/nlopt-2.4.2/util' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/c/temp/nlopt-2.4.2' make: *** [all] Error 2
_______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel