Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1062819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T18:41:15+00:00 2026-05-16T18:41:15+00:00

Working in Windows, I’ve created an r package that links to a c++ dll

  • 0

Working in Windows, I’ve created an r package that links to a c++ dll as a shared library. This works fine and installs without problems on Windows. When I switch to linux, however, the so is not found.

Am I right in thinking that the only file in the src directory should be the .cpp file?

Do I actually need to run the SHLIB command in that directory before I create the package?

In the NAMESPACE I use:

useDynLib(myc.cpp,my.c.function)

and in the function call:

my.r.f <- .Call(my.c.function, a, b)

On windows running R CMD check works fine. Could it be my linux R configuration that is to blame? It seems to install 3rd party packages fine.

I’m stumped!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T18:41:16+00:00Added an answer on May 16, 2026 at 6:41 pm

    I think you should just use useDynLib(myc)… The symbol lookup is done internally.
    EDIT: The other thing is the name of this object file — I think the standard makefile just names it with package name, so it should be rather useDynLib(<package name>). At least it always works for me.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working with Windows CE 5 and, before realizing that this was the wrong
I am working on Windows Service. It works fine. When i am trying to
I have modified a working Windows service that had always been starting beforehand. After
I'll start working on windows forms application that hosts ESRI maps into it So,
We are working in Windows network (AD in use) We have folder shared by
I am working with Windows form application. In that I retrieve the data from
I am working on windows mobile 6, i created one application in VS 2005
I've been working with Windows API calls so that I can get some native
Recently I am working on windows and I found that lot of data structures
pydoc does not work in Windows. at this post Pydoc is not working (Windows

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.