[CCPPETMR/SIRF] Debug-build on Windows fails unless python27_d.lib is present (#42)

2 views
Skip to first unread message

Kris Thielemans

unread,
Jul 2, 2017, 1:17:40 PM7/2/17
to CCPPETMR/SIRF, Subscribed

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


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Casper da Costa-Luis

unread,
Jul 3, 2017, 5:10:17 AM7/3/17
to CCPPETMR/SIRF, Subscribed

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

Kris Thielemans

unread,
Dec 20, 2017, 5:18:07 PM12/20/17
to CCPPETMR/SIRF, Subscribed

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.

Reply all
Reply to author
Forward
0 new messages