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 8996817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:48:19+00:00 2026-06-15T23:48:19+00:00

Based on this tutorial – http://www.r-bloggers.com/using-r-callling-c-code-with-rcpp/ I was trying to call a C function

  • 0

Based on this tutorial – http://www.r-bloggers.com/using-r-callling-c-code-with-rcpp/
I was trying to call a C function from R.
The C code have following dependencies and it works perfectly after compiling the C code

#include <json/json.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <curl/curl.h>
#include <time.h>
#include <math.h>
#include <Rcpp.h>

Now when i am trying to load the so file , i am seeing the below error.

dyn.load("storage.so")
Error in dyn.load("storage.so") : 
unable to load shared object '/home/algotree/Rcode/storage.so':
/home/algotree/Rcode/storage.so: undefined symbol: json_object_array_length

Seems R is not able to link the rest of header files.

How can I fix it?

  • 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-15T23:48:20+00:00Added an answer on June 15, 2026 at 11:48 pm

    This has nothing to do with Rcpp (for which we also provide ample documentation regarding use on its own, in package, via inline, …).

    You seem to use JSON-parsing functionality, but apparently have not linked to a JSON-parser library corresponding to the header json/json.h you included.

    Apart from this question being incomplete in its code example and hence not reproducible, I see two issues here:

    1. learn the ropes about C/C++ program using libraries, and

    2. apply this to the R context.

    As you using JSON and Curl based on your headers, you could (and probably should) study the corresponding packages like RJSONIO and RCurl.

    If you know what is going there and understand the mechanics, you can then use Rcpp to provide the new functionality you are seeking. But just by throwing Rcpp in the mix, these issues do not address themselves. You need to understand how in include headers and link libraries.

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

Sidebar

Related Questions

I am trying to get a multilingual site up according to this tutorial: http://nuts-and-bolts-of-cakephp.com/2008/11/28/cakephp-url-based-language-switching-for-i18n-and-l10n-internationalization-and-localization/
Working on group highlighting for a form based on this tutorial I found: http://www.jankoatwarpspeed.com/examples/ContextHighlighting/
I have been writting a keyword search script based on this tutorial: http://www.hackosis.com/2007/11/06/howto-simple-search-engine-with-php-and-mysql/ Like
I am using this tutorial: http://mobile.tutsplus.com/tutorials/android/android-sdk-creating-a-rotating-dialer/ Which gives me a rotating dialer based on
5 star rating script I have is made based on this tutorial http://php.about.com/od/finishedphp1/ss/rating_script.htm I
I'm using this tutorial as the basis for a Code Igniter / Doctrine based
I have simple WCF Service Application (based on this tutorial http://msdn.microsoft.com/en-us/library/ms734712.aspx ). Is it
I followed this tutorial to create multilingual site. http://nuts-and-bolts-of-cakephp.com/2008/11/28/cakephp-url-based-language-switching-for-i18n-and-l10n-internationalization-and-localization/ However although I can get
I'm using this tutorial: http://android-developers.blogspot.com/2011/04/customizing-action-bar.html I set a drop down list theme like this
I'm folowing this tutorial to create php/jquery based chat application. In short, this code

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.