Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IDE / setup for package development with C++ code integrated

Tags:

c++

package

r

ide

rcpp

I'm trying to get a grip on C++/Rcpp as an extension to R for heavy computational tasks. Ultimately, these C++ libs should be integrated in a package, and therefor I'm looking for a setup / combination of tools / IDE that I would need to work easily. I know much is taste dependent, but still it would be nice to know my options before choosing.

So : when you develop R packages with C++ libs, what is the setup you work with?

  • do you use the same editor / IDE for R and C++ and which one (or which ones) ?
  • are there extra tools (apart from Rtools) that are important to get ?
  • are there tweaks in the general setup that are important to know or speed up the process considerably?

Sorry if this question has been asked before. I found a list of all editors for R, but nothing specifically directed towards developing of packages including C++ code. Any hints or tips are really appreciated.

Edit : platform is Windows, but I can move to Linux without problems (dual boot, only thing keeping me from using ubuntu is the lack of a decent driver for my old card/old screen combination)

like image 229
Joris Meys Avatar asked Nov 09 '10 16:11

Joris Meys


People also ask

Can I use Eclipse for C?

Eclipse is also used for C and C++ development as well as PHP among the other programming languages. Eclipse IDE is written in Java. It mainly consists of a base 'workspace' and a plug-in system so that we can add more plugins and extend the functionality of the IDE.

Can we code C in IntelliJ?

C/C++ are not officially supported in IntelliJ IDEA, but you can use CLion. You can browse the JetBrains Marketplace to find an official plugin that adds support for almost any language, framework or technology used today, or for third-party plugins.

Is Visual Studio an IDE for C?

Visual Studio 2022 CommunityThe best comprehensive IDE for .NET and C++ developers on Windows.


2 Answers

Eclipse + statet if you want to join in us in the modern world :)

like image 117
Dr G Avatar answered Oct 15 '22 17:10

Dr G


I'm of course fully in favour of more Rcpp work :)

As for your questions, and in order:

  • same editor (Emacs) which makes for nice consistency on either platform I use (mostly Linux, occassionally Windows); for the record I have also spoke out in favour of the qtcreator IDE which is pretty nice on Linux and Windows (but doesn't do R).
  • no, on Linux it all comes ready made (and yes, on Windows you do need Rtools) ...
  • not really -- you probably already know about inline which is good for testing R/C++ code snippets.

Edit: So in a way, this is really no different from normal R / C / C++ / Fortran development. And in that case I usually refer to R FAQ Section 6 which is devoted entirely to R and Emacs :) With that said, setting Emacs up for C++ work is not obvious and there are a number of questions and posts here. I do not use any particular class browser but there are some, as well as approaches to auto-completion of types etc.

like image 26
Dirk Eddelbuettel Avatar answered Oct 15 '22 17:10

Dirk Eddelbuettel