Posts

Showing posts from August, 2017

Major milestone achieved: JyNI builds successfully on Windows, DemoExtension is workable

After fixing the remaining symbol errors MSVC successfully created JyNI.dll for the very first time – what a historical moment!
Unfortunately the euphoria didn't last long, because when loading DemoExtension, it directly crashed.
After some investigation I found out that JyNI.dll was successfully loaded by the JVM and I also verified that code in the dll was actually accessed and properly run. Even the initial call into DemoExtension.pyd worked. However, the call to Py_InitModule4 crashed:
It seemed like symbols from JyNI.dll were not exported for access by DemoExtension.pyd. Strangely, the error message wasn't like one would expect for this. It rather looked like DemoExtension.pyd was calling into CPython's python27.dll, i.e. the one installed on the system.

The definite proof of concept After some reading in MSDN docs I learned that the names of dll dependencies are hard coded at compile time, which means that DemoExtension.pyd will insist on loading python27.dll, no mat…