Hello Rcpp-Devel,

This is my first question posted to this list, so please remind me if I'm 
missing crucial details in my inquiry!

I have successfully interfaced Yoshimasa Tsuruoka's excellent C++ maximum 
entropy library ( http://www-tsujii.is.s.u-tokyo.ac.jp/~tsuruoka/maxent/ ) 
using RcppClassic, and everything compiles cleanly on *NIX and OS X when 
compiled from source (via the same method described below). However, when I try 
to install from my repository on a Windows 7 machine (using R 2.12.1 64-bit), 
it starts throwing a lot of errors. I have RTools installed, with both the 
32-bit and 64-bit options selected, and a blank Rcpp package skeleton compiles 
fine on my machine. Could anyone point me in the right direction as to what's 
going differently on Windows vs my *NIX machines?

Thank you in advance for any help!
Tim

The commands I run in R look like:
repositories <- 
c("http://install.rtexttools.com/","http://cran.r-project.org","http://www.omegahat.org/R";)
install.packages("maxent", repos=repositories, type="source")

My Makevars.win file looks like:
PKG_LIBS = $(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e 
"Rcpp:::LdFlags()")
PKG_LIBS += $(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e 
"RcppClassic:::LdFlags()")

These headers are included in all files with Rcpp code:
#include <RcppClassic.h>
#include <R.h>
#include <Rmath.h>

And the error output looks like (for both 32-bit and 64-bit builds, error 
output is identical for both g++ and x86_64-w64-mingw32-g++):
x86_64-w64-mingw32-g++ -shared -s -static-libgcc -o maxent.dll tmp.def blmvm.o 
maxent.o rmaxent.o 
C:/Users/timjurka/Documents/R/win-library/2.12/Rcpp/lib/x64/libRcpp.a 
C:/Users/timjurka/Documents/R/win-library/2.12/RcppClassic/lib/x64/libRcppClassic.a
 -LC:/PROGRA~1/R/R-212~1.1/bin/x64 -lR
C:/Users/timjurka/Documents/R/win-library/2.12/RcppClassic/lib/x64/libRcppClassic.a(RcppResultSet.o):RcppResultSet.cpp:(.text+0x1a4):
 undefined reference to `Rcpp::internal::getPosixClasses()'
C:/Users/timjurka/Documents/R/win-library/2.12/RcppClassic/lib/x64/libRcppClassic.a(RcppResultSet.o):RcppResultSet.cpp:(.text+0x66):
 undefined reference to `Rcpp::internal::new_date_object(double)'
C:/Users/timjurka/Documents/R/win-library/2.12/RcppClassic/lib/x64/libRcppClassic.a(RcppResultSet.o):RcppResultSet.cpp:(.text+0x7d):
 undefined reference to `Rcpp::internal::new_posixt_object(double)'
C:/Users/timjurka/Documents/R/win-library/2.12/RcppClassic/lib/x64/libRcppClassic.a(RcppResultSet.o):RcppResultSet.cpp:(.text$_ZN13RcppResultSet16add__matrix__stdIiEEvRKSsRKSt6vectorIS3_IT_SaIS4_EESaIS6_EE[void
 RcppResultSet::add__matrix__std<int>(std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, 
std::vector<std::vector<int, std::allocator<int> >, 
std::allocator<std::vector<int, std::allocator<int> > > > const&)]+0x115): 
undefined reference to `Rcpp::Dimension::Dimension(unsigned long long const&, 
unsigned long long const&)'
C:/Users/timjurka/Documents/R/win-library/2.12/RcppClassic/lib/x64/libRcppClassic.a(RcppResultSet.o):RcppResultSet.cpp:(.text$_ZN13RcppResultSet16add__matrix__stdIiEEvRKSsRKSt6vectorIS3_IT_SaIS4_EESaIS6_EE[void
 RcppResultSet::add__matrix__std<int>(std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, 
std::vector<std::vector<int, std::allocator<int> >, 
std::allocator<std::vector<int, std::allocator<int> > > > const&)]+0x15a): 
undefined reference to `Rcpp::Dimension::prod() const'
C:/Users/timjurka/Documents/R/win-library/2.12/RcppClassic/lib/x64/libRcppClassic.a(RcppResultSet.o):RcppResultSet.cpp:(.text$_ZN13RcppResultSet16add__matrix__stdIiEEvRKSsRKSt6vectorIS3_IT_SaIS4_EESaIS6_EE[void
 RcppResultSet::add__matrix__std<int>(std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, 
std::vector<std::vector<int, std::allocator<int> >, 
std::allocator<std::vector<int, std::allocator<int> > > > const&)]+0x190): 
undefined reference to `Rcpp::Dimension::size() const'
C:/Users/timjurka/Documents/R/win-library/2.12/RcppClassic/lib/x64/libRcppClassic.a(RcppResultSet.o):RcppResultSet.cpp:(.text$_ZN13RcppResultSet16add__matrix__stdIiEEvRKSsRKSt6vectorIS3_IT_SaIS4_EESaIS6_EE[void
 RcppResultSet::add__matrix__std<int>(std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, 
std::vector<std::vector<int, std::allocator<int> >, 
std::allocator<std::vector<int, std::allocator<int> > > > const&)]+0x200): 
undefined reference to `Rcpp::Dimension::operator SEXPREC*() const'
C:/Users/timjurka/Documents/R/win-library/2.12/RcppClassic/lib/x64/libRcppClassic.a(RcppResultSet.o):RcppResultSet.cpp:(.text$_ZN13RcppResultSet11add__matrixIiEEvRKSsPPT_ii[void
 RcppResultSet::add__matrix<int>(std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, int**, int, int)]+0xc7): 
undefined reference to `Rcpp::Dimension::Dimension(unsigned long long const&, 
unsigned long long const&)'
C:/Users/timjurka/Documents/R/win-library/2.12/RcppClassic/lib/x64/libRcppClassic.a(RcppResultSet.o):RcppResultSet.cpp:(.text$_ZN13RcppResultSet11add__matrixIiEEvRKSsPPT_ii[void
 RcppResultSet::add__matrix<int>(std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, int**, int, 
int)]+0x106): undefined reference to `Rcpp::Dimension::prod() const'
C:/Users/timjurka/Documents/R/win-library/2.12/RcppClassic/lib/x64/libRcppClassic.a(RcppResultSet.o):RcppResultSet.cpp:(.text$_ZN13RcppResultSet11add__matrixIiEEvRKSsPPT_ii[void
 RcppResultSet::add__matrix<int>(std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, int**, int, 
int)]+0x13c): undefined reference to `Rcpp::Dimension::size() const'
C:/Users/timjurka/Documents/R/win-library/2.12/RcppClassic/lib/x64/libRcppClassic.a(RcppResultSet.o):RcppResultSet.cpp:(.text$_ZN13RcppResultSet11add__matrixIiEEvRKSsPPT_ii[void
 RcppResultSet::add__matrix<int>(std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, int**, int, 
int)]+0x1a3): undefined reference to `Rcpp::Dimension::operator SEXPREC*() 
const'
C:/Users/timjurka/Documents/R/win-library/2.12/RcppClassic/lib/x64/libRcppClassic.a(RcppResultSet.o):RcppResultSet.cpp:(.text$_ZN13RcppResultSet16add__matrix__stdIdEEvRKSsRKSt6vectorIS3_IT_SaIS4_EESaIS6_EE[void
 RcppResultSet::add__matrix__std<double>(std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, 
std::vector<std::vector<double, std::allocator<double> >, 
std::allocator<std::vector<double, std::allocator<double> > > > 
const&)]+0x115): undefined reference to `Rcpp::Dimension::Dimension(unsigned 
long long const&, unsigned long long const&)'
C:/Users/timjurka/Documents/R/win-library/2.12/RcppClassic/lib/x64/libRcppClassic.a(RcppResultSet.o):RcppResultSet.cpp:(.text$_ZN13RcppResultSet16add__matrix__stdIdEEvRKSsRKSt6vectorIS3_IT_SaIS4_EESaIS6_EE[void
 RcppResultSet::add__matrix__std<double>(std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, 
std::vector<std::vector<double, std::allocator<double> >, 
std::allocator<std::vector<double, std::allocator<double> > > > 
const&)]+0x15a): undefined reference to `Rcpp::Dimension::prod() const'
C:/Users/timjurka/Documents/R/win-library/2.12/RcppClassic/lib/x64/libRcppClassic.a(RcppResultSet.o):RcppResultSet.cpp:(.text$_ZN13RcppResultSet16add__matrix__stdIdEEvRKSsRKSt6vectorIS3_IT_SaIS4_EESaIS6_EE[void
 RcppResultSet::add__matrix__std<double>(std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, 
std::vector<std::vector<double, std::allocator<double> >, 
std::allocator<std::vector<double, std::allocator<double> > > > 
const&)]+0x190): undefined reference to `Rcpp::Dimension::size() const'
C:/Users/timjurka/Documents/R/win-library/2.12/RcppClassic/lib/x64/libRcppClassic.a(RcppResultSet.o):RcppResultSet.cpp:(.text$_ZN13RcppResultSet16add__matrix__stdIdEEvRKSsRKSt6vectorIS3_IT_SaIS4_EESaIS6_EE[void
 RcppResultSet::add__matrix__std<double>(std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, 
std::vector<std::vector<double, std::allocator<double> >, 
std::allocator<std::vector<double, std::allocator<double> > > > 
const&)]+0x200): undefined reference to `Rcpp::Dimension::operator SEXPREC*() 
const'
C:/Users/timjurka/Documents/R/win-library/2.12/RcppClassic/lib/x64/libRcppClassic.a(RcppResultSet.o):RcppResultSet.cpp:(.text$_ZN13RcppResultSet11add__matrixIdEEvRKSsPPT_ii[void
 RcppResultSet::add__matrix<double>(std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, double**, int, 
int)]+0xc7): undefined reference to `Rcpp::Dimension::Dimension(unsigned long 
long const&, unsigned long long const&)'
C:/Users/timjurka/Documents/R/win-library/2.12/RcppClassic/lib/x64/libRcppClassic.a(RcppResultSet.o):RcppResultSet.cpp:(.text$_ZN13RcppResultSet11add__matrixIdEEvRKSsPPT_ii[void
 RcppResultSet::add__matrix<double>(std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, double**, int, 
int)]+0x106): undefined reference to `Rcpp::Dimension::prod() const'
C:/Users/timjurka/Documents/R/win-library/2.12/RcppClassic/lib/x64/libRcppClassic.a(RcppResultSet.o):RcppResultSet.cpp:(.text$_ZN13RcppResultSet11add__matrixIdEEvRKSsPPT_ii[void
 RcppResultSet::add__matrix<double>(std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, double**, int, 
int)]+0x13c): undefined reference to `Rcpp::Dimension::size() const'
C:/Users/timjurka/Documents/R/win-library/2.12/RcppClassic/lib/x64/libRcppClassic.a(RcppResultSet.o):RcppResultSet.cpp:(.text$_ZN13RcppResultSet11add__matrixIdEEvRKSsPPT_ii[void
 RcppResultSet::add__matrix<double>(std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, double**, int, 
int)]+0x1a3): undefined reference to `Rcpp::Dimension::operator SEXPREC*() 
const'
collect2: ld returned 1 exit status
ERROR: compilation failed for package 'maxent'
* removing 'C:/Users/timjurka/Documents/R/win-library/2.12/maxent'

_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to