elbamos / largeVis

An implementation of the largeVis algorithm for visualizing large, high-dimensional datasets, for R
340 stars 62 forks source link

linker error in windows #5

Closed JerryDing closed 8 years ago

JerryDing commented 8 years ago

neighbors.o:neighbors.cpp:(.text+0x5eb7): undefined reference to `dgemv_'

davidleon commented 8 years ago

more details? I'm running win10. R(64bit). And Rtools(64bit). the following command works for me: rcmd INSTALL largevis --no-multiarch

JerryDing commented 8 years ago

Thanks. I use devtools for i386: install_github("elbamos/largevis")

C:/RBUILD~1/3.1/mingw32/bin/g++ -shared -s -static-libgcc -o largeVis.dll tmp.def RcppExports.o largeVis.o neighbors.o pjicalculation.o -fopenmp -Ld:/Compiler/gcc-4.9.3/local330/lib/i386 -Ld:/Compiler/gcc-4.9.3/local330/lib -LC:/PROGRA~1/R/R-33~1.0/bin/i386 -lR neighbors.o:neighbors.cpp:(.text+0x5eb7): undefined reference to `dgemv' neighbors.o:neighbors.cpp:(.text+0x6642): undefined reference to`dgemv_' collect2.exe: error: ld returned 1 exit status no DLL was created

elbamos commented 8 years ago

@JerryDing I don't have a Windows machine to try to diagnose this --- but "dgemv_" is part of the BLAS. So I would look at whether your BLAS, LAPACK, and RcppArmadillo are installed properly and functioning correctly.

complexly commented 8 years ago

@JerryDing I came across the same error, and solved the issue by adding " $(LAPACK_LIBS) $(BLAS_LIBS)" to the variable PKG_LIBS in the file src/Makevars.

JerryDing commented 8 years ago

@complexly Thanks. That's the solution because I did not link BLAS.

xiaolibird commented 8 years ago

@davidleon @complexly

I linked the BLAS and LAPACK like this below in src\Makevars, and I've installed RcppArmadillo  PKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS)$(LAPACK_LIBS)$(BLAS_LIBS)

and "dgemv_" didn't appear

but it still had 'undefined reference to 'omp_get_num_threads' ' and similar ones but my Rtools\gcc-4.6.3\i686-w64-mingw32\include does have omp.h

seems like anything about OpenMP doesn't work

I'm running win10. R(64bit). And Rtools(64bit).

elbamos commented 8 years ago

@xiaolibird This should be fixed in the current version, 0.1.5. Again, I don't have a Windows machine, so I'm trying to test Windows build with Appveyor. Let me know if issues persist.

xiaolibird commented 8 years ago

@elbamos It works! Thanks a lot.