1

I am attempting to make use of lib2geom in an Electron app. I was able to write a script that employs the library to obtain an intersection of two paths and then wrap it with node-addon-api using examples from https://github.com/nodejs/node-addon-examples. I've hosted this attempt: lib2geom-path-boolean-addon.

I'm having problems using cmake-js to build the script (I was successful building a non-addon script using CMake). As documented in the CMakeLists.txt file, I get the following error when attempting to run the install npm script:

relocation R_X86_64_PC32 against symbol `_ZGVZN4Geom6chooseIdEET_jjE16pascals_triangle' can not be used when making a shared object; recompile with -fPIC

and adopting the suggestion here (now commented) did not remedy the issue.

I'm just learning C++ and CMake for this addon so it's hard to know where to start with debugging this issue. Any insights would be greatly appreciated. I hope this can become a valuable resource for the community.

1
  • I fixed my problem by using the solution provided in this SO accepted answer Commented Aug 2, 2020 at 23:38

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.