3 Replies Latest reply: Mar 7, 2012 5:27 PM by 914426 RSS

    Cannot Open Input File 'libdb53d.lib'

    912175
      I'm attempting to build for C# on VS2010 using 64bit win XP:

      I am a little unsure which project to build, the documentation says:

      The C# support is built by a separate Visual Studio solution and requires version 2.0 (or higher) of the .NET platform. In Visual Studio 2005/Visual Studio 2008, the solution is build_windows\BDB_dotnet.sln; in Visual Studio 2010, the solution is build_windows\BDB_dotnet_vs2010.sln.

      The native libraries will be placed in one of the following subdirectories, depending upon the chosen configuration:
      build_windows\Win32\Debug
      build_windows\Win32\Release
      build_windows\x64\Debug
      build_windows\x64\Release

      First the file name is not BDB_dotnet.sln or BDB_dotnet_vs2010.sln, this is minor but a bit misleading.

      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'

      Any help on the configuration would be appreciated
        • 1. Re: Cannot Open Input File 'libdb53d.lib'
          526060
          Hi,
          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?

          Regards,
          Alex Gorrod
          Oracle Berkeley DB
          • 2. Re: Cannot Open Input File 'libdb53d.lib'
            914426
            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:

            build_windows\Win32\Debug
            build_windows\Win32\Release
            build_windows\x64\Debug
            build_windows\x64\Release

            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.

            Exception info:
            System.TypeInitializationException
            Message=The type initializer for 'BerkeleyDB.Internal.libdb_csharpPINVOKE' threw an exception.
            Source=excs_getting_started
            TypeName=BerkeleyDB.Internal.libdb_csharpPINVOKE
            StackTrace:
            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 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
            at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
            at System.Threading.ThreadHelper.ThreadStart()
            InnerException: System.TypeInitializationException
            Message=The type initializer for 'SWIGStringHelper' threw an exception.
            Source=libdb_dotnet53
            TypeName=SWIGStringHelper
            StackTrace:
            at BerkeleyDB.Internal.libdb_csharpPINVOKE.SWIGStringHelper..ctor()
            at BerkeleyDB.Internal.libdb_csharpPINVOKE..cctor() in D:\work\releases\db-5.3.15\lang\csharp\src\Internal\libdb_csharpPINVOKE.cs:line 33
            InnerException: System.BadImageFormatException
            Message=An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
            Source=libdb_dotnet53
            StackTrace:
            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
            InnerException:
            • 3. Re: Cannot Open Input File 'libdb53d.lib'
              914426
              It turns out the native libaries codes are in Berkeley DB 5.3.15.zip download file.

              Edited by: user6189667 on Mar 7, 2012 3:27 PM