jonasfj / zbar-sharp

.Net/Mono bindings for zbar
http://jonasfj.github.io/zbar-sharp/
GNU Lesser General Public License v2.1
41 stars 25 forks source link

[DllImport("libzbar")] #3

Open bambams opened 13 years ago

bambams commented 13 years ago

One thing I noticed today while attempting to package up my software (which depends on libzbar-cil and libzbar*) is that libzbar-cil references libzbar[.dll], whereas zbar seems to distribute the DLL as libzbar-0[.dll]. I don't really remember why this wasn't a problem earlier, but I assume that I probably manually copied x to y within the installation folder to make things work. That is always an option for deployment too, but it does raise the question of why libzbar is distributed that way and why libzbar-cil references it by another name. Do you also copy libzbar-0.dll to libzbar.dll or is your environment just different than mine?

jonasfj commented 13 years ago

I run Linux and use mono for zbar-sharp development... And there's a lot of different prefixes and extensions depending on the platform (See [1] for details)...

I suppose [DllImport("zbar")] or [DllImport("zbar-0")] might do... Or perhaps I should write .config file for mono. Anyway, I'm thinking about shipping binaries which would probably solve the issue...

But yes, I should fix the dll import statement at some point... It's pretty Linux specific at this point...

[1] http://www.mono-project.com/Interop_with_Native_Libraries#Library_Handling

bambams commented 13 years ago

It probably does make the most sense the way it is (or "zbar", if Mono supports that), but of course Windows fails when it comes to linking... :P I say do it the logical way, and if necessary distribute a renamed copy to make it work in Windows. :P

Edddy commented 13 years ago

Shipping the binaries would be a big time saver. I'm struggling to make the sample work

scriptBoris commented 1 year ago

OMG, issue by 2011 year... But the problem of present is actual...