Hi, I spent most of yesterday trying to get the simple tutorials and example to build from within the Boost example folders, and finally succeeded. It was not super straightforward as the instructions seem incomplete and out of date. But after finding a tutorial on Boost.Build and understanding how it works, I was able to debug the build process and get the test scripts to run successfully.
Now I’d like to move to Spyder and run simple tests on the extension. However, when I try to execute a simple “import hello_ext” statement, I get an error trying to locate a dependent library. No amount of setting paths seem to help. (I copied libboost_python37.dylib to /Users/andy before running this script. I’m on Mac OS Mojave Commands: import os print(os.environ['PATH']) os.environ['PATH'] += ':/Users/andy' os.environ['DYLD_LIBRARY_PATH'] = '/Users/andy' print(os.environ['PATH']) print(os.environ['DYLD_LIBRARY_PATH']) import hello_ext Output: /Users/andy/anaconda3/bin:/Users/andy/anaconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin /Users/andy/anaconda3/bin:/Users/andy/anaconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/andy /Users/andy Traceback (most recent call last): File "", line 7, in import hello_ext ImportError: dlopen(/Users/andy/Dropbox (Personal)/Developer/boost_1_70_0/libs/python/example/tutorial/hello_ext.so, 2): Library not loaded: libboost_python37.dylib Referenced from: /Users/andy/Dropbox (Personal)/Developer/boost_1_70_0/libs/python/example/tutorial/hello_ext.so Reason: image not found What magic is the boost environment performing to make this work? What can I do to make my python extensions look for libboost_python37.dylib in the location where it lives? Thanks in advance for any help! * Andy
_______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org https://mail.python.org/mailman/listinfo/cplusplus-sig