Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Debug-build on Windows fails unless python27_d.lib is present #42

Open
KrisThielemans opened this issue Jul 2, 2017 · 2 comments
Open
Labels

Comments

@KrisThielemans
Copy link
Member

It seems that Python.h automatically instructs the linker to use python27_d.lib (we don't!). On my system (Anaconda) this results in a linking error as this library is not distributed.

This appears to be a known problem, see e.g. https://stackoverflow.com/questions/16200997/why-doesnt-include-python-h-work

As we cannot control the Swig output, one (rather horrible) trick is to make your own Python.h as in
https://github.com/malaterre/GDCM/blob/master/Wrapping/Python/Python.h.in

@KrisThielemans KrisThielemans added this to the v0.9.1 milestone Jul 2, 2017
@casperdcl
Copy link
Member

Yes, I've used said horrible trick before. We could possibly alternatively get away with creating a temporary symlink python27_d.lib -> python27.lib

@KrisThielemans
Copy link
Member Author

reading more on this, these tricks seems unsafe (as the debug build of python isn't compatible with the normal one). So we won't fix this.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants