Hi, I wonder where I can find an example of using a function in LAPACK library in a user's own C code. I wrote a C program which will be compiled and linked to produce a DLL file and then loaded into R. I hope to use a function from LAPACK library, for example, dgesdd, in the program. Following R manual, I call the function by F77_CALL(dgesdd) in the program. The program can be compiled without problems. However, when it is linked to produce a DLL file, I get an error message
Test.obj : error LNK2001: unresolved external symbol _dgesdd_ Test.dll : fatal error LNK1120: 1 unresolved externals I use VC++6.0 and the command of linking is something like this link.exe Rdll.lib /nologo /dll /out:Test.dll /libpath:C:\R\R-2.2.1\src\gnuwin32 Test.obj Apparently, the linker cannot resolve dgesdd from Rdll.lib. If anyone knows what I missed here or any example that shows how this can be done properly, please let me know. Thanks a lot. Paul. ____________________________________________________________________________________ Never miss an email again! ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
