<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">An update on this thread:<div><br></div><div>I successfully compiled a function with the line " <span style="font-size:13px;color:rgb(36,39,41);font-family:Arial,"Helvetica Neue",Helvetica,sans-serif">#include <boost/multiprecision/eigen.hpp></span> ".   I have also been able to compile a (non-exported) function that gives as an output a "Eigen::Matrix<boost::multiprecision::float128, Eigen::Dynamic, 4>".</div><div><br></div><div>However, when I try to export an auxiliary function that casts the float128 into a double, I get an error message saying "<span style="background-color:rgb(239,240,241);color:rgb(36,39,41);font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;font-size:13px;white-space:pre-wrap">RcppExports.cpp:11:108: error: 'boost' was not declared in this scope</span>".</div><div><br></div><div>So, it seems that in RcppExports, the compiler does not "understand" that boost exists. Since I have not used BH, since BH uses boost 1.66, and only boost 1.68 has the include that combines eigen and boost, I assume that the problem is that, in some unknown way to me, I should tell the compiler that at RcppExports it should use the includes of boost in my cpp file:</div><div><br></div><div><div>#include <boost/multiprecision/float128.hpp></div><div>#include <boost/multiprecision/eigen.hpp></div></div><div><br></div><div>But RcppExports only have:</div><div><br></div><div><pre class="gmail-default gmail-prettyprint gmail-prettyprinted" style="margin-top:0px;margin-bottom:1em;padding:5px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;font-size:13px;vertical-align:baseline;box-sizing:inherit;width:auto;max-height:600px;overflow:auto;background-color:rgb(239,240,241);color:rgb(57,51,24)"><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;vertical-align:baseline;box-sizing:inherit;white-space:inherit"><span class="gmail-com" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-sizing:inherit;color:rgb(133,140,147)">#include</span><span class="gmail-pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-sizing:inherit;color:rgb(48,51,54)"> </span><span class="gmail-str" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-sizing:inherit;color:rgb(125,39,39)"><RcppArmadillo.h></span><span class="gmail-pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-sizing:inherit;color:rgb(48,51,54)">
</span><span class="gmail-com" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-sizing:inherit;color:rgb(133,140,147)">#include</span><span class="gmail-pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-sizing:inherit;color:rgb(48,51,54)"> </span><span class="gmail-str" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-sizing:inherit;color:rgb(125,39,39)"><RcppEigen.h></span><span class="gmail-pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-sizing:inherit;color:rgb(48,51,54)">
</span><span class="gmail-com" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-sizing:inherit;color:rgb(133,140,147)">#include</span><span class="gmail-pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-sizing:inherit;color:rgb(48,51,54)"> </span><span class="gmail-str" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-sizing:inherit;color:rgb(125,39,39)"><Rcpp.h></span></code></pre></div><div>What should I do, in order to tell the compiler that in RcppExports, boost should be "understood"?</div><div><br></div><div>The question has also been posted in stackoverflow, since my initial question was posted there, but I think that rcppdevel is probably a better place to ask this question:</div><div><br></div><div><a href="https://stackoverflow.com/questions/52964042/boost-is-not-recognized-in-r-when-exporting">https://stackoverflow.com/questions/52964042/boost-is-not-recognized-in-r-when-exporting</a><br></div><div><br></div><div>Best</div><div><br clear="all"><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Jordi Molins i Coronado</div><div><div>+34 69 38 000 59</div></div></div></div></div></div></div><br></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 23, 2018 at 5:10 PM Jordi Molins <<a href="mailto:jordi.molins.coronado@gmail.com">jordi.molins.coronado@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">An update: it really seems the problem was in updating gcc to 8.1. I have installed Rtools again, and now, following the steps in the link above, I have been able to successfully compile code with the line "

<span style="color:rgb(36,39,41);font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:13px">#include <boost/multiprecision/eigen.hpp></span>  ". I will check now if I can use code (there is nothing of boost in the code, so far, apart from the include).<div><br></div><div>So, my request is not urgent now. Of course, I will be delighted with a new BH version.</div><div><br clear="all"><div><div dir="ltr" class="m_3429185365947947582gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Jordi Molins i Coronado</div><div><div>+34 69 38 000 59</div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 23, 2018 at 4:19 PM Jordi Molins <<a href="mailto:jordi.molins.coronado@gmail.com" target="_blank">jordi.molins.coronado@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr">Hello,<div><br></div><div>I am trying to use eigen and boost at the same time, in R (Windows). The reason is that eigen allows now data types such as float128.</div><div><br></div><div>What happens is that this link between eigen and boost is new (boost 1.68). I believe BH uses boost 1.66.</div><div><br></div><div>I received an answer in stackoverflow:</div><div><br></div><div><a href="https://stackoverflow.com/questions/52871038/using-boost-multiprecision-with-rcppeigen/52887046?noredirect=1#comment92801003_52887046" target="_blank">https://stackoverflow.com/questions/52871038/using-boost-multiprecision-with-rcppeigen/52887046?noredirect=1#comment92801003_52887046</a><br></div><div><br></div><div>of how to install boost 1.68 without needing BH. I have tried to implement that solution, but it does not work: I get an error message such as "<span style="background-color:rgb(239,240,241);color:rgb(36,39,41);font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;font-size:13px">c:/rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgfortran collect2.exe: error: ld returned 1 exit status</span>". And now I do not know how to solve this "<span style="background-color:rgb(239,240,241);color:rgb(36,39,41);font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;font-size:13px">cannot find -lgfortran</span>" issue (note: this could be entangled with the fact that I substituted the gcc 4.9 compiler in Rtools for gcc 8.1, since I could not compile a single sourceCpp with gcc 4.9, but yes with gcc 8.1; I can perfectly compile Rcpp projects, though).</div><div><br></div><div>So, I would like to kindly ask if BH could be updated to boost 1.68. I understand that updating BH must be a big work, and we all have many things to do. But I see usually BH is updated twice per year, and this year there has been one update so far. Also, the union of BH and eigen is possibly a source of happiness for this community, since AFAIK, so far BH and eigen were completely separated.</div><div><br></div><div>Of course, if this request cannot be executed, I am happy too. I am just asking in case somebody could do it without too much work, and in fact, he was thinking in doing it anyway.</div><div><br></div><div>Best regards</div><div><br></div><div>Jordi Molins i Coronado<br></div><div><div dir="ltr" class="m_3429185365947947582m_4550364414310263883gmail_signature"><div dir="ltr"><div dir="ltr"><div><div>+34 69 38 000 59</div></div></div></div></div></div></div></div>
</blockquote></div>
</blockquote></div>