Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Creating SWIG Python bindings for CGAL function

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Creating SWIG Python bindings for CGAL function


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Creating SWIG Python bindings for CGAL function
  • Date: Mon, 9 Sep 2019 06:33:52 +0200
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:47nvVRX/ZYkDoI1Gz3rwhSDdwZzV8LGtZVwlr6E/grcLSJyIuqrYbRCCt8tkgFKBZ4jH8fUM07OQ7/m6HzVQvN3R7DgrS99lb1c9k8IYnggtUoauKHbQC7rUVRE8B9lIT1R//nu2YgB/Ecf6YEDO8DXptWZBUhrwOhBoKevrB4Xck9q41/yo+53Ufg5EmCexbal9IRmrswndrNQajIhiJ6o+yRbErWZDdvhLy29vOV+dhQv36N2q/J5k/SRQuvYh+NBFXK7nYak2TqFWASo/PWwt68LlqRfMTQ2U5nsBSWoWiQZHAxLE7B7hQJj8tDbxu/dn1ymbOc32Sq00WSin4qx2RhLklDsLOjgk+2zRl8d+jr9UoAi5qhJi3YDUboGbOvlwcKzTctwVR3ZOUMlKWixdAI6xdZcDA/YPMOtaqYT2ulsArQG5BQmpHO7jxCJGiWHt0qIgyOQhDQDG0xImH9kTtnrUq8/1NKYVUeCp0aLEyTTNYO1R2Tf49ofIbgohoPGMU71qbcXR1U4vFxnFj1mVp4DuIjSY1v8Js2ic9epgVOWvi3I9pwF0pjii3cgsiozTiYIUzlDI7zl2wIEwJdChTkNwfNCqEJxVty6ANot2RNsvQ2dytykh0bIGvYC0cDIWx5Qgwh7Tc+eHc5SS7R3/V+aRJil4i2x/eLKxgxay9kahxvfgWcmz1VZHqDdOnNrUtn0VyRDf9syKRuF+80qhwzqDyh7f5+JeLU07lafXM4AtzaQsmpYOtEnMACH7lUrzgaCIeEUp+/Sn5uH6brjpvZCQK4p5hR/jPaswlMGyBPo0PwgAUmWV/Omx2rnu8lD3QLhPkvI5jqjUv47cKM8GvKC2GRVV3Zwm6xunDzepztAYnX4fIVJAYh2HjozpN0jAIfD9EPuzmlqsnThryvzcMb3hBZLNLnfHkLj/Z7py90lcyA8rwdBe4ZJbFK0BLertVkPtsNHUFBw0Pgyuz+r6Ftlw1ZkSVG2PD6OBNaPdq16I5uYhI+mWY48VvS7wK+Mh5/7pl385mFgdfbWz0ZsSbHC1BftmI0CDbnrthtcNC3sFvg07TODykl2NTSZTZ2quX6I7/jw0FI2mAp3HRoy0nbOB3Ty7EYFLZmBdEVCBCmzodoWBW/cUci2eOM5hkjoeVbigUYAtzx+utBWpg4Zge+Hb8ylduZP438Vu/MXSkwsz/Hp6FZezyWaIGitPk2kBXCM30aY3hUtny1CfmehXjvtdGMBJ9t1AWRs9L4+dhaQuENT1QAPGYpGMTH6pR9ynBXc6SddnkIxGWFp0B9j31kOL5CGtGbJAz+XaVqxxybrV2j3KH+g4zn/H0Kc7iFx/G5lAMGSnguh08A2BXteUwXXcrL6jcOEn5ACI9GqHyjDT7kRRUQo1TqCcGH5DOw3ZqtP24k6ERLirW+x+bllxjPWaI64PUeXHyE1cTa66atvbamO13Wy3AETQyw==

Duplicated SO post (with an answer):

https://stackoverflow.com/questions/57824076/building-python-interface-to-custom-cgal-function

Sebastien.

On 9/6/19 4:35 PM, rahulverma88 wrote:
Hi, I'm trying to build a python interface to a custom CGAL function. The
function works just fine on its own, but I get errors when I try to do the
linking with Python using SWIG.

I have been using 'cgal_create_cmake_lists' to create the CMakeLists.txt for
the CGAL part, doing cmake and make, and then using the generated .o files
to link with SWIG, but I think I am not linking the required boost and GMP
libraries properly with the SWIG-generated shared object ".so" file.

SWIG generates the shared object files for me, but then when I try to import
my module, I get an error:

Symbol not found: __ZN4CGAL11NULL_VECTORE

I am using the command "ld -bundle -flat_namespace -undefined suppress -o
cgal_executable.so *.o" to generate the shared object file. Should I be
linking boost and GMP libraries in this step? If so, how do I do that? I am
on a Mac OS. I can share my full code if needed.

I know there is a project for Python-SWIG bindings, but I really don't need
all of it, and also it seems to be missing a lot of useful CGAL features. I
would like to work in C++, and just interface my functions with Python as
needed.



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/




Archive powered by MHonArc 2.6.18.

Top of Page