bwlewis/irlba

How to compile the .c files in the src folder

RockLee117 opened this issue · 0 comments

Hello @bwlewis. I'm trying to call the c version of irlb from python so my goal is to create a shared library (.so).
I have downloaded R, built lapack, and have irlb.c, irlb.h, and utility.c in a folder.
In Vscode, I'm running the command to compile:
cc -fPIC -shared -o irlb.so -I"D:\lapack\build\include" -I"C:/Program Files/R/R-4.3.1/include/" -I"C:/Program Files/R/R-4.3.0/library/Matrix/include/" -L"C:/Program Files (x86)/LAPACK/lib/" -L"C:\Program Files\R\R-4.3.0\library\Matrix\libs\x64" -llapack -lblas irlb.c utility.c

But I'm getting errors saying there are undefined references to the functions being used by the files that were included:
image
collect2.exe: error: ld returned 1 exit status

I'm guessing the compiler doesnt know where the source files are for the .h files (correct me if I'm wrong). How do I solve this issue?
Thank you sir!