[Rcpp-devel] Static or dynamic link under Windows?

Dominick Samperi djsamperi at gmail.com
Thu Jul 8 22:12:03 CEST 2010

Why was it decided to use static linking under Windows?

The main advantage is that users do not need to worry about
placing the directory containing Rcpp.dll in their search
path. A disadvantage is that the client executable will
be larger (but not by a large fraction in my testing).

Basically, <whatever>/library/Rcpp/lib/libRcpp.a can be replaced with
-Wl,--enable-auto-import <whatever>/library/Rcpp/libs/Rcpp.dll, and
then libRcpp.a is not needed.

There appear to be subtle differences between the way
things work under 32bit and 64bit Windows, having something
to do with the way DLL's are mapped at startup, and sometimes
requiring use of a cygwin tool named rebase.exe. Some
insight into the issues can be found on the Wiki page for
Portable Executable (PE) format.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20100708/259bb34f/attachment.htm>

More information about the Rcpp-devel mailing list