quamotion / AS.TurboJpegWrapper

Libjpeg-Turbo wrapper for .Net - Forked from https://bitbucket.org/Sergey_Terekhin/as.turbojpegwrapper
MIT License
37 stars 28 forks source link

"Unable to load DLL 'turbojpeg' - OS X #5

Closed aseemgautam closed 6 years ago

aseemgautam commented 6 years ago

I am getting this error on line - TJCompressor compressor = new TJCompressor();

I have copied turbojpeg.dll file from the source project to bin/nuget folder. Does not work. Is there any additional step required to use this wrapper on OS X?

qmfrederik commented 6 years ago

Did you add a reference to /runtime.osx.10.10-x64.Quamotion.TurboJpegWrapper? .dll files don't work on macOS; you need .dylib files and that package contains the dylib files.

aseemgautam commented 6 years ago

So I was able to run this via adding a configuration setting -

<configuration>
        <dllmap os="osx" dll="libturbojpeg.dll" target="libturbojpeg.dylib"/>
</configuration>

Is this ok or should I add a reference to runtime.osx.10.10-x64.Quamotion.TurboJpegWrapper.

qmfrederik commented 6 years ago

Sorry, didn't get the fact that you're using Mono. I've never tested this on Mono, but if this configuration works for you, no need to change it :)

aseemgautam commented 6 years ago

.NET core on OS X High Sierra. Using VS for mac. Adding reference works well. Thanks.

qmfrederik commented 6 years ago

Fixed via #6 .