|How can I compile leveldb as a dll so I can use in my C# program?||Xinuo Chen||1/18/12 4:03 AM|
My program is written in C# and I am not familiar with C++.
I wish to use leveldb, however, I believe there is no good port yet
So I think whether I can compile leveldb into dll and use it in my C#
Can I do it? and could anyone pls give me some guide of how to do it?
|Re: [leveldb] How can I compile leveldb as a dll so I can use in my C# program?||Jeremiah Peschka||1/18/12 4:17 AM|
Once you complied leveldb for Windows, you should be able to reference the DLL and then use PInvoke to make calls into leveldb. Just as when using any other unmanaged resource, make sure to wrap calls to leveldb with a using() directive and dispose of them properly or else you could run into memory management issues.
|Re: How can I compile leveldb as a dll so I can use in my C# program?||Xinuo Chen||1/18/12 4:35 AM|
Do you mind telling me how to compile leveldb for Windows? I followed
the instructions in the doc, but the whole solution gave warning of
uint_32 can't be recognized or something
On Jan 18, 12:17 pm, Jeremiah Peschka <jeremiah.pesc...@gmail.com>
> Once you complied leveldb for Windows, you should be able to reference the
|Re: How can I compile leveldb as a dll so I can use in my C# program?||Xinuo Chen||1/18/12 8:10 AM|
I followed the instructions here
but I got 405 errors, such as "Error 8 error C2065: 'size' :
undeclared identifier", "Error 1 error C2065: 'uint32_t' : undeclared
Any one can help me with this?
I have included boost libs, and done everything that is told in the
|Re: [leveldb] Re: How can I compile leveldb as a dll so I can use in my C# program?||Krzysztof Kowalczyk||1/18/12 2:20 PM|
Sorry about lack of documentation in my port. To compile
kkowalczyk-leveldb run build.bat script in win directory.
Alternatively, you can open one of the many Visual Studio 2010 project
files in win directory (they are there to make testing easier).
build.bat will build release and debug version of 32bit and 64bit
Note that if you don't have 64bit compilers installed (they are
If you want to recreate the build, you can analyze makefile.msvc,
The WINDOWS file describes the other windows port, based on boost. My
|Re: How can I compile leveldb as a dll so I can use in my C# program?||Ren Z||10/12/14 6:49 AM|
For those who still struggle with this problem: I've recently found this:
also cloned to github here:
Compile leveldb-windows with VS2013, copy resulting dll to leveldb-windows and everything works like a charm.