Question

I am trying to use the EDSDK on macOS 10.9.1 through the medium of C#.

I am using Xamarin and I get no DllNotFoundException's, so presumably it is finding the framework. Neither am I getting an EntryPointNotFoundException so that's not the issue.

When I try and call EdsInitializeSDK() it simply never returns, as if it were in an infinite loop or something similar.

If I call other functions which obviously return an error code since the SDK is not initialised they return without the IDE flagging up any problems.

Does anyone have any idea why this might be happening?

Additionally the sample (Objective C) program runs successfully.

No correct solution

OTHER TIPS

to get the SDK running with C# on mac you should:

  • Copy EDSDK.framework and DPP.framework into your built *.app in the folder "Contents/Frameworks/" (you might need to create this folder)
  • Add a App.config file to your project with the following content:

    <?xml versin="1.0"?>
    <configuration>
        <dllmap dll="EDSDK" target="@executable_path/../Frameworks/EDSDK.framework /EDSDK" />
    </configuration>
    
  • In the wrapper class where you do the P/Invoke you need to change

    [DllImport("EDSDK.dll")]
    

    to

    [DllImport("EDSDK")]
    

    (using dllmap with dll="EDSDK.dll" sadly doesn't work, you'll have to stick to "EDSDK" or any other name without .dll)

If you follow these steps your program will work perfectly fine.

Kind regards

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top