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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:00:25+00:00 2026-06-09T14:00:25+00:00

I am trying to run a test function but I am getting a compile

  • 0

I am trying to run a test function but I am getting a compile error:

library(Rcpp)  
library(inline) 

testfun = cxxfunction(  
signature(x="numeric", i="integer"),  
body = '  
NumericVector xx(x);    
int ii = as<int>(i);  
xx = xx * ii;  
return( xx );  
', plugin="Rcpp")  
testfun(1:5, 3)  

Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created!
In addition: Warning message:
running command ‘C:/PROGRA~1/R/R-215~1.1/bin/x64/R CMD SHLIB filede44a566900.cpp 2> filede44a566900.cpp.err.txt’ had status 1

I would be grateful for your help. I am using windows 7, R2.15.1, 64 bit

  • 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-09T14:00:26+00:00Added an answer on June 9, 2026 at 2:00 pm

    Try adding verbose=TRUE as you seem to have a simple setup issue — maybe your PATH is not correct.

    Your code is correct and runs just fine here under Linux (where no additional gymnastics is needed as there is on Windows).

    Your slightly edited / indented example as copied from my Emacs ESS buffer:

    R> library(inline)
    R> 
    R> testfun <- cxxfunction(signature(x="numeric", i="integer"), body = '
    +    NumericVector xx(x);
    +    int ii = as<int>(i);
    +    xx = xx * ii;
    +    return( xx );
    + ', plugin="Rcpp")
    R> 
    R> testfun(1:5, 3)
    [1]  3  6  9 12 15
    R> 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to run JUnit4 test cases on Eclipse 3.4.2 but it's not even
When trying to run a junit test I get the following error - java.lang.ClassCastException:
I am trying to run a nodeJS test script with socket.io but the deployed
I am trying to run the following C function from Java using JNA, but
I'm trying to run a test version of a web using the File System
I am trying to run my test cases on Chrome and I had copied
I am trying to run PHPUnit test at CakePHP 2.0. There's no problem with
I am trying to run a test on selenium IDE to enter to my
I'm trying to run a test suite that will handle the jQuery lightbox. Lightbox
I'm using Hibernate 4.0.1.Final. I'm trying to run a JUnit test on my DAO

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.