简体   繁体   中英

python/c++ wrapping on Snow Leopard

I create a dynamic library and then using swig under snow leopard but when I import my module it returns always ImportError: No module named blabla. I've all compiled in 64 bit, download and install python 2.7 64 bit. This test library has been created with cmake, and when I was with leopard 32 bit, it worked.

Given that it worked on 32 bits, I would first check whether the library has 64 bits code. You can use the file command I think to check the arch in a multi-arch mach-o binary.

If the library is indeed 64 bits, then please give us the exact exception in python, and more importantly, a build log from cmake. Build issues for python extensions on mac are quite tricky because of the multi-arch support, and some incompatibilities between gcc versions, hence the need for more details.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM