<div dir="ltr"><div><br></div><div>Context:</div><div><br></div><div>I develop a new rcouchbase package <span style="font-family:arial,sans-serif;font-size:12.800000190734863px">client for couchbase.</span><span style="font-family:arial,sans-serif;font-size:12.800000190734863px"> </span></div>
<div>I am following the example of <a href="https://github.com/eddelbuettel/rhiredis">rhir<span id="goog_1734836951"></span><span id="goog_1734836952"></span>edis</a> package.</div><div>Including libcouchbase headers using : <span style="color:rgb(0,0,255)">#include <libcouchbase/couchbase.h></span>works fine.  <br>
<br></div><div>Problem:</div><div><br></div><div>dyn.load failed to load symbol due to and undefined symbol: lcb_destroy. <br>I think this is a link problem because I don't tell Rcpp compiler where/how to find libcouchebase libs.<br>
</div><div>Ho can I fix this?</div><div><br></div><div>What I have tried:</div><div><br></div><div>Should I create <a href="http://configure.in">configure.in</a> and <a href="http://makvers.in">makvers.in</a> like in this <a href="http://dirk.eddelbuettel.com/code/rcpp/RcppGSL.pdf">RcppGSL package</a>? </div>
<div>Reading the vignette I did not see how can I adopt it for my needs. </div><div>Also from this <a href="http://dirk.eddelbuettel.com/code/rcpp/Rcpp-package.pdf">vignette </a> it looks like this changed with Rcpp release 0.11.0. These files are now optional.</div>
<div>And also, The <a href="https://github.com/eddelbuettel/rhiredis">rhir<span id="goog_1734836951"></span><span id="goog_1734836952"></span>edis</a> package don't provide a configure for autoconf, and I think  it works fine.<br>
</div><div><br></div><div><br></div><div>Thanks again for your help.</div><div>agstudy</div><div><br></div><div><br></div><div><br></div><div><br></div><div>I am </div><div><br></div><div><br></div><div><br></div><div><br>
<div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 18, 2014 at 6:21 PM, contact AG STUDY <span dir="ltr"><<a href="mailto:contact@ag-study.com" target="_blank">contact@ag-study.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Dirk,<div><br></div><div>Thanks for your help. I will get a closer look at <span style="font-family:arial,sans-serif;font-size:12.800000190734863px">rhiredis</span><span style="font-family:arial,sans-serif;font-size:12.800000190734863px">  package.</span></div>

<div><span style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:12.800000190734863px">Amine GASSEM</span></div><div><span style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br>

</span></div><div><font face="arial, sans-serif">For the mail I agree it is better to have my fisrt/last name.</font></div><div><font face="arial, sans-serif">The problem I am using my professional mail. </font></div><div>

<font face="arial, sans-serif">I will see if I can create an alias to this one with a proper </font><span style="font-family:arial,sans-serif;font-size:12.800000190734863px">identifiable</span><span style="font-family:arial,sans-serif;font-size:12.800000190734863px">   name.</span></div>

</div><div class=""><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 18, 2014 at 6:14 PM, Dirk Eddelbuettel <span dir="ltr"><<a href="mailto:edd@debian.org" target="_blank">edd@debian.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
Amine,<br>
<div><div><br>
On 18 March 2014 at 17:56, contact AG STUDY wrote:<br>
| I would like to use to create an R client for couchbase. ( let me know if there<br>
| is already an existing package)<br>
| My idea is to create a new R package based on the c library libcouchbase. <br>
| This is what is already done for other wrappers in python,ruby,..<br>
| What is the best method to call the C code from Rcpp? <br>
| Can Iuse dyn.load('../../libcouchebase.so.2"), or should I copy all the c code?<br>
| If I should copy , what part of code in the original code I need , src folder<br>
| and the makfile for example?<br>
| Is there any R/Rcpp package doing similar tasks ( a wrapper to a c library) ,<br>
| that I can follow to start ?<br>
<br>
</div></div>Among the 186 existing CRAN packages using Rcpp, many do in fact use either<br>
an external library as you plan here, or in simpler cases embed the code (eg<br>
my RcppCNPy just adds one or two C files).<br>
<br>
I'll probably also rename lib rhiredis package on Github into RcppRedis to<br>
make this more plain; it too uses an external library, here the C library<br>
hiredis.<br>
<br>
Dirk<br>
<br>
PS List etiquette I'd really like to establish / confirm is to sign an email<br>
with a proper, identifiable name.  I tell you who I am, don't readers deserve<br>
to know about you if you ask them to help you?<br>
<span><font color="#888888"><br>
--<br>
Dirk Eddelbuettel | <a href="mailto:edd@debian.org" target="_blank">edd@debian.org</a> | <a href="http://dirk.eddelbuettel.com" target="_blank">http://dirk.eddelbuettel.com</a><br>
</font></span></blockquote></div><br></div>
</div></div></blockquote></div><br></div></div>