I have a module using NativeCall that works on both Linux and macOS, but not Windows. When I try to use the module on Windows I get lots of errors like:
# Cannot locate symbol 'TinyTIFFReader_open' in native library 'tinytiff.dll'
I use cmake for my C++ dependency on all three OS's. On Linux and macOS I can just cmake ..; make; sudo make install
, and on Windows I cmake -G "Visual Studio 15 2017 Win64" ..
and then open the created ".sln" in Visual Studio to compile. The build succeeds with no errors on all three OS's.
Does anyone have any ideas of what I would need to do/change to also get my module working on Windows?
The full module is located here: https://github.com/ryn1x/Graphics-TinyTIFF
I think you will have to give TINYTIFFREADER_LIB_EXPORT
and TINYTIFFWRITER_LIB_EXPORT
defines a value (either in the source, but probably better to have it be passed by the build system) and on windows i think it has to be __declspec(dllexport)
, otherwise the symbols may not be made available in the dll.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With