<div dir="ltr">Hello dear list members,<div><br></div><div>I'm working the an a package with Rcpp code, and would like to have a cpp function in one file, and then be able to access it from another.</div><div>It appears that using:</div>

<div>#include "file_name.hpp"<br></div><div>Works great while compiling.</div><div><br></div><div>However, when debugging the file, I discovered the when I use "sourceCpp" on the file which has "#include", it is not able to find the other functions and I get:</div>

<div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div>fatal error: src/is_functions.hpp: No such file or directory compilation terminated. make: *** [get_branches_heights.o] Error 1 </div>

</div><div><div>Error in Rcpp::sourceCpp("src/get_branches_heights.cpp") : </div></div><div><div>  Error 1 occurred building shared library.</div></div></blockquote><div><br></div><div>I've tried using:</div>

<div>#include "src/file_name.hpp"<br></div><div>instead, but it didn't help either.</div><div><br></div><div>Is there something I'm missing?</div><div><br></div><div><br></div><div>Thanks.</div><div><br>

</div><div><br></div><div><br></div><div><br clear="all"><div><div dir="ltr"><br>----------------Contact Details:-------------------------------------------------------<br>Contact me: <a href="mailto:Tal.Galili@gmail.com" target="_blank">Tal.Galili@gmail.com</a> |  <br>

Read me: <a href="http://www.talgalili.com" target="_blank">www.talgalili.com</a> (Hebrew) | <a href="http://www.biostatistics.co.il" target="_blank">www.biostatistics.co.il</a> (Hebrew) | <a href="http://www.r-statistics.com" target="_blank">www.r-statistics.com</a> (English)<br>

----------------------------------------------------------------------------------------------<br><br></div></div>
</div></div>