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

  • Home
  • SEARCH
  • 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 8721107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:10:05+00:00 2026-06-13T07:10:05+00:00

Although a few solutions exist on the internet, I found none of those suitable

  • 0

Although a few solutions exist on the internet, I found none of those suitable for the problem I’m curerntly facing (though maybe I’m simply too dumb):

I’m trying to build an R package which makes extensive use of a shared object compiled by a Makefile (yes, bad practice, I know, but a Makevars file just can’t be told to compile C and Fortran code into one shared object) from code in the package’s src directory. No matter where I compile that .so to (I tried the src, libs and package base folders) or how I name it (as one of the solutions mentioned above states it must be named like the package it’s contained in), R CMD check exits with

** testing if installed package can be loaded
Error in library.dynam(lib, package, package.lib) : 
shared object ‘SoMNibEN.R.so’ not found

due to the useDynLib(SoMNibEN.R) instruction in my NAMESPACE file (where SoMNibEN.R is my package’s name, but it didn’t work with the original name, either)

My assumption is that I’m either using that useDynLib() command wrong or I’m doing something wrong with my Makefile (although the compilation works pretty well and the shared object is created in my project folder – I just don’t know whether it gets copied to the package installation directory successfully).

So, if anyone knows what I might be doing wrong here, please let me know!

  • 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-06-13T07:10:06+00:00Added an answer on June 13, 2026 at 7:10 am

    You want the name of the package as the argument, as that is the name of the shared object built by R, eg useDynLib("chron"). The quotes are optional (as they are for library() etc).

    I also recommend not using a Makefile, but simply dropping the C and Fortran files in the src/ directory. R is generally smart enough to know what to. If you need -I etc switches you can set them there.

    Lastly, use CRAN. There are hundreds of packages with compiled sources, and some are bound to be similar in structure to your question.

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

Sidebar

Related Questions

Although I have found some solutions to this problem, none of them refer to
Although I have read a few previously answered questions regarding a similar issue, I
I have a tricky problem that I've been messing about with for a few
Although there are already a few resources online that address this rough topic, I
To my horror I've just found out that chr doesn't work with Unicode, although
I've found a few samples online but I'd like to get feedback from people
I have been searching over the internet for the past few hours looking for
So I have put together a few Python C-extensions and although their respective behaviors
Although this code is from an algorithm text, I have a bit of a
Although appengine already is schema-less, there still need to define the entities that needed

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.