fel88 / DeepNestPort

DeepNest C# Port
MIT License
79 stars 35 forks source link

System.badimageformatexception in minkowski DLL #13

Closed weltondepaula closed 3 years ago

weltondepaula commented 3 years ago

Hi guys, I need your help.

I'm compiling the DLL as the example described by fel88, it is correctly generating the dll. When I put the dll together with DeepNestPort.exe folder and run the application the exception is generated.

I tried to change the dll path, but the error remains.

Has anyone been through this, or has any idea to help me. Do I need to install something else?

Thanks. WhatsApp Image 2021-06-28 at 13 47 24 (1) WhatsApp Image 2021-06-28 at 13 47 24 (2) WhatsApp Image 2021-06-28 at 13 47 24 (3) WhatsApp Image 2021-06-28 at 13 47 24

fel88 commented 3 years ago

Hi, you probably have x86/x64 mismatch problem. Try switching the compiler to x64 https://github.com/fel88/DeepNestPort/issues/2

You can also try to set 'platform target' to x86 image

9swampy commented 3 years ago

C isn't in my comfort zone and I've been having fun with the DLL compilations too. I'd concur with the suggestion to try flip over to x86 and found a simpler command in compile.bat works in some cases where the full didn't;

cl /Ox -I "D:\boost\boost_1_62_0" /LD minkowski.cc

Sorry, I don't have the reference of where I got that suggestion from; it's in one of the DeepNestPort or DeepNest issues.

weltondepaula commented 3 years ago

Hello guys, thanks so much for help.

Fell88, your tip solved my problem. I did some changes im my project to use x64.

When I published to instal I have beem change in the TragetPlatform too.

In select the setup project > properties and change the TragetPlatform to x64.

Thanks.