xeus-cling icon indicating copy to clipboard operation
xeus-cling copied to clipboard

General feedback on integrating a library

Open rene-fonseca opened this issue 5 years ago • 3 comments

Hi team,

I spend a few days integrating my library with jupyter/xeus/cling. And put together some feedback on the various issues that came up.

I do like what you have accomplished so far. And everything is now running ok for me. However, I think there are a lot of nice to haves.

You can check my feedback at the bottom of the page: https://github.com/rene-fonseca/base/wiki/cling-Support

I don't want to open a lot issues since I just may not yet be aware of some features. But I can certainly do that the issues that turn out to be relevant.

rene-fonseca avatar Feb 18 '20 19:02 rene-fonseca

Hey,

I read through your comments briefly. Just wanted to show you how we integrate our libraries:

https://github.com/jupyter-xeus/xwidgets/blob/203d95ac5eb3be778a610ecfc820d982dfcca464/include/xwidgets/xwidgets_config_cling.hpp.in#L9-L15

So we generate some #pragmas for cling at CMake configuration time. Maybe that could guide you regarding your problems with library paths etc.?

wolfv avatar Feb 19 '20 08:02 wolfv

Hey,

I read through your comments briefly. Just wanted to show you how we integrate our libraries:

https://github.com/jupyter-xeus/xwidgets/blob/203d95ac5eb3be778a610ecfc820d982dfcca464/include/xwidgets/xwidgets_config_cling.hpp.in#L9-L15

So we generate some #pragmas for cling at CMake configuration time. Maybe that could guide you regarding your problems with library paths etc.?

Yes, thanks that is a possibility. I have avoided this for my lib. My library is currently built so it is the same regardless if it run with cling. This is accomplished by only having the cling specific compile time code in the header files and a limited runtime checks in the cpp files. And then relying on the install folders being in the include and lib search paths. This works fine. I do still use these pragma's for special cases, though.

rene-fonseca avatar Feb 19 '20 11:02 rene-fonseca

This is accomplished by only having the cling specific compile time code in the header files

This seems like what we are doing here though?

SylvainCorlay avatar Feb 19 '20 11:02 SylvainCorlay