This content has been marked as final. Show 3 replies
First the file name is not BDB_dotnet.sln or BDB_dotnet_vs2010.sln, this is minor but a bit misleading.What is the name of the solution file you are using? The above two solution files exist in the db-5.X.XX/build_windows directory (X.XX being version numbers). They are the solution files you should use for building the C# API.
second, and more importantl,y it appears no native libraries are built to the above mentioned directories. The only one I can get to build is win32\release the rest fail with the linker error Cannot Open Input File 'libdb53d.lib'Which version of Berkeley DB are you using? Which version of Visual Studio are you using? Exactly what steps are you using to build?
Oracle Berkeley DB
I have the similar problem. I am using Berkeley DB 11gR2 5.3.15 and VS 2010 on windows 7.
Firstly, the solution name is build_windows\BDB_dotNet_examples_vs2010, not BDB_dotNet_vs2010 as claimed in the help file.
Secondly, there is no native libraries built. It will copy libdb_dotnet53.dll to build_windows\AnyCPU\Release after building the solution. But there is no such subdirectories created at all:
When running excs_getting_started or any other example programs, there will be an exception "The type initializer for 'BerkeleyDB.Internal.libdb_csharpPINVOKE' threw an exception".
Any help will be appriciated.
Message=The type initializer for 'BerkeleyDB.Internal.libdb_csharpPINVOKE' threw an exception.
at excs_getting_started.DatabaseExample.Main(String args) in F:\Oracle\Berkeley DB 11gR2 5.3.15\examples\csharp\excs_getting_started\DatabaseExample.cs:line 69
at System.AppDomain._nExecuteAssembly(Assembly assembly, String args)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
Message=The type initializer for 'SWIGStringHelper' threw an exception.
at BerkeleyDB.Internal.libdb_csharpPINVOKE..cctor() in D:\work\releases\db-5.3.15\lang\csharp\src\Internal\libdb_csharpPINVOKE.cs:line 33
Message=An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
at BerkeleyDB.Internal.libdb_csharpPINVOKE.SWIGStringHelper.SWIGRegisterStringCallback_libdb_csharp(SWIGStringDelegate stringDelegate)
at BerkeleyDB.Internal.libdb_csharpPINVOKE.SWIGStringHelper..cctor() in D:\work\releases\db-5.3.15\lang\csharp\src\Internal\libdb_csharpPINVOKE.cs:line 30