<!--$Id: faq.so,v 10.37 2007/05/30 08:39:08 alexg Exp $--> <!--Copyright (c) 1997,2007 Oracle. All rights reserved.--> <!--See the file LICENSE for redistribution information.--> <html> <head> <title>Berkeley DB Reference Guide: Windows FAQ</title> <meta name="description" content="Berkeley DB: An embedded database programmatic toolkit."> <meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++"> </head> <body bgcolor=white> <a name="2"><!--meow--></a><a name="3"><!--meow--></a> <table width="100%"><tr valign=top> <td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Building Berkeley DB for Windows systems</dl></h3></td> <td align=right><a href="../build_win/notes.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../build_wince/intro.html"><img src="../../images/next.gif" alt="Next"></a> </td></tr></table> <p> <h3 align=center>Windows FAQ</h3> <ol> <p><li><b>Why do I have db_load.dll - where is db_load.exe?</b> <p>Microsoft Visual C++ .NET has some bugs related to converting project files from VC++ 6.0 format and incorrectly converts the db_load project. For more information, see <a href="http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q321274&">Microsoft's article about this bug</a>.</p> <p>The workaround is simply to switch the <b>db_load</b> project back to generating an EXE after converting to VC++ .NET. To do this, right click on db_load -> Properties and change "Configuration Type" from "Dynamic Library (.dll)" to "Application (.exe)".</p> <p><li><b>My Win* C/C++ application crashes in the Berkeley DB library when Berkeley DB calls fprintf (or some other standard C library function).</b> <p>You should be using the "Debug Multithreaded DLL" compiler option in your application when you link with the build_windows\Debug\libdb46d.lib library (this .lib file is actually a stub for libdb46d.DLL). To check this setting in Visual C++, choose the <i>Project/Settings</i> menu item and select <i>Code Generation</i> under the tab marked <i>C/C++</i>; and see the box marked <i>Use runtime library</i>. This should be set to <i>Debug Multithreaded DLL</i>. If your application is linked against the static library, build_windows\Debug\libdb46sd.lib; then, you will want to set <i>Use runtime library</i> to <i>Debug Multithreaded</i>.</p> <p>Setting this option incorrectly can cause multiple versions of the standard libraries to be linked into your application (one on behalf of your application, and one on behalf of the Berkeley DB library). That violates assumptions made by these libraries, and traps can result.</p> <p><li><b>Why are the build options for DB_DLL marked as "Use MFC in a Shared DLL"? Does Berkeley DB use MFC?</b> <p>Berkeley DB does not use MFC at all. It does however, call malloc and free and other facilities provided by the Microsoft C runtime library. We found in our work that many applications and libraries are built assuming MFC, and specifying this for Berkeley DB solves various interoperation issues, and guarantees that the right runtime libraries are selected. Note that because we do not use MFC facilities, the MFC library DLL is not marked as a dependency for libdb.dll, but the appropriate Microsoft C runtime is.</p> <a name="4"><!--meow--></a> <p><li><b>How can I build Berkeley DB for <a href="http://www.mingw.org">MinGW</a>?</b> <p>Follow the instructions in <a href="../../ref/build_unix/intro.html">Building for UNIX/POSIX</a>, and specify the --enable-mingw option to the configuration script. This configuration option currently only builds static versions of the library, it does not yet build a DLL version of the library.</p> </ol> <table width="100%"><tr><td><br></td><td align=right><a href="../build_win/notes.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../build_wince/intro.html"><img src="../../images/next.gif" alt="Next"></a> </td></tr></table> <p><font size=1>Copyright (c) 1996,2007 Oracle. All rights reserved.</font> </body> </html>