Re: [Rd] LinkingTo for 2 packages

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Fri, 08 Aug 2008 19:06:57 +0100 (BST)

A delated reply: the problem on Windows was a missing set of quotes. Herve Pages provided an example, and this should work (does for me) on both Unix and Windows in R-patched and R-devel.

On Thu, 17 Apr 2008, Iago Mosqueira wrote:

> Hello,
>
> One of our packages contains C++ code that needs to be compiled against
> 2 other packages. So the LinkingTo field in DESCRIPTION looks like this
>
> LinkingTo: FLCore,FLash
>
> Both packages are also in the Depends field.
>
> In R 2.6.2, first thing we noticed was that both names could not have
> any space between them, althoguh the example in the html version of
> "Writing R Extensions" does have one:
>
> "A package that wishes to make use of header files in other packages
> needs to declare them as a comma-separated list in the field LinkingTo
> in the DESCRIPTION file. For example
>
> Depends: link2, link3
> LinkingTo: link2, link3"
>
> With the space character, this is the compiler call found in 00install.out
>
> g++ -I/usr/local/lib/R/include -I/usr/local/lib/R/include
> -I/usr/local/include -I"/usr/local/lib/R/library/FLCore/include" -fpic
> -g -O2 -c FLBRP.cpp -o FLBRP.o
>
> while deleting it means both include folders are correctly added
>
> g++ -I/usr/local/lib/R/include -I/usr/local/lib/R/include
> -I/usr/local/include -I"/usr/local/lib/R/library/FLCore/include"
> -I"/usr/local/lib/R/library/FLash/include" -fpic -g -O2 -c FLBRP.cpp
> -o FLBRP.o
>
> Secondly, this behaviour has been detected when running R CMD check on
> Linux (R.Version below), while in windows the second include is never
> generated even if the space character is deleted.
>
> g++-sjlj -Ic:/progra~1/r/r-2.6.2/include
> -I"c:/progra~1/r/r-2.6.2/library/FLCore/include" -O2 -Wall -c
> FLBRP.cpp -o FLBRP.o
>
> We haven't been able to test yet on the latest R 2.7.0rc.
>
> Thanks,
>
>
> Iago
>
>
> WINDOWS:
>>> R.Version()
> $platform
> [1] "i386-pc-mingw32"
>
> $arch
> [1] "i386"
>
> $os
> [1] "mingw32"
>
> $system
> [1] "i386, mingw32"
>
> $status
> [1] ""
>
> $major
> [1] "2"
>
> $minor
> [1] "6.2"
>
> $year
> [1] "2008"
>
> $month
> [1] "02"
>
> $day
> [1] "08"
>
> $`svn rev`
> [1] "44383"
>
> $language
> [1] "R"
>
> $version.string
> [1] "R version 2.6.2 (2008-02-08)"
>
>
> LINUX:
>> R.Version()
> $platform
> [1] "i686-pc-linux-gnu"
>
> $arch
> [1] "i686"
>
> $os
> [1] "linux-gnu"
>
> $system
> [1] "i686, linux-gnu"
>
> $status
> [1] ""
>
> $major
> [1] "2"
>
> $minor
> [1] "6.2"
>
> $year
> [1] "2008"
>
> $month
> [1] "02"
>
> $day
> [1] "08"
>
> $`svn rev`
> [1] "44383"
>
> $language
> [1] "R"
>
> $version.string
> [1] "R version 2.6.2 (2008-02-08)"
>
> ______________________________________________
> R-devel_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
Brian D. Ripley,                  ripley_at_stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Fri 08 Aug 2008 - 18:11:47 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 09 Aug 2008 - 02:36:14 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive