<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello,<div><br></div><div>I am in the process, i.e. I just began to write a Rcpp-based package for a Windows environment. The purpose of that package will be to read out signals from a USB-connected hardware. The company who is selling this hardware is distributing a SDK for developing custom C-programms to read out those signals, so I have all the required files (.h, .lib, .dll) to compile a working .exe file -- and now, due to some reasons, I want to implement this code in an R-package, and read out the signals from the devices straight from within R.</div><div>I am planning to expose the needed C-functions via modules to R, but, unfortunately, I did not even come that far:</div><div><br></div><div>Hereīs my problem:</div><div><b>I do not know, i.e. it is not clear to me how to link / use the .lib file of the SDK in my package.</b></div><div>(In the instructions coming with the SDK they write: &nbsp;"... copy the contents of "API \ lib" to your compilerīs lib directory)</div><div>Is it possible that I have to use the LDFlags function in src/Makevars.win here somehow? If yes, then I do not know how to write the appropriate code....</div><div>I do have two .dll files (which I place in in the src-folder) and I suppose that I just write them into the Namespace-file using "useDynLib(NameOfTheFile)".</div><div>But, as I was not able to compile the package yet, I do not know if this is right either...</div><div>(And the .h file I just put into the src-folder....)</div><div><br></div><div><b>Could someone, please, show me a way and &nbsp;the code of how to correctly link the .lib file in my package?</b></div><div>Thank you very much,</div><div>with best greetings from Austria,</div><div>Bernhard Pollner</div><div><br></div></body></html>