[RQt-devel] disabling native symbol registration
Michael Lawrence
lawrence.michael at gene.com
Mon Mar 21 14:40:25 CET 2011
On Sun, Mar 20, 2011 at 11:13 PM, Deepayan Sarkar <deepayan.sarkar at gmail.com
> wrote:
> On Mon, Mar 21, 2011 at 5:39 AM, Michael Lawrence
> <lawrence.michael at gene.com> wrote:
> > Hi guys,
> >
> > On Windows, we want to embed the Qt DLLs in the package. Looks like it
> makes
> > the package about 60 MB in size, which is probably OK. The main issue is
> > that we need to load the library in .onLoad(), after we set the PATH,
> which
> > means we cannot use the NAMESPACE useDynLib(qtbase, .registration=TRUE).
> > Thus, we lose automatic assignment of the registered native symbols in
> the
> > namespace. This means using .Call("foo", PACKAGE="qtbase") instead of
> > .Call(foo). The latter is obviously a lot cleaner, but it's a small price
> to
> > pay to get things smoothly working on Windows. One alternative would be
> > statically linking with Qt. That would require us to maintain our own Qt
> > static libs (converted from the DLLs). That in my opinion is worse than
> the
> > more complex .Call syntax.
>
> I'm fine with the .Call("foo", PACKAGE="qtbase") form.
>
> Is it another option to require user-installed Qt as on Linux? (Of
> course not a good idea, but just wanted to check).
>
>
It is an option, but yes something we want to avoid. Another option would be
to perform the registration manually in .onLoad, but that would require
"declaring" the symbols as NULL or something in the package. That would
present a maintenance headache. Or we could define them in a separate
environment and have .Call(native$foo). Another option is to have a .QtCall
wrapper that simulates it.
I've gone ahead and switched the syntax of the .Call invocations. The
Windows version seems to work fine now, without a separate installation of
Qt! Next step is to get this for the other packages, qtpaint and qtutils.
And then it's CRAN time.
Michael
> -Deepayan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/qtinterfaces-devel/attachments/20110321/340d5111/attachment.htm>
More information about the Qtinterfaces-devel
mailing list