diff options
Diffstat (limited to 'docs/installation/build_win_faq.html')
-rw-r--r-- | docs/installation/build_win_faq.html | 184 |
1 files changed, 109 insertions, 75 deletions
diff --git a/docs/installation/build_win_faq.html b/docs/installation/build_win_faq.html index 14a5f228..398ff3e2 100644 --- a/docs/installation/build_win_faq.html +++ b/docs/installation/build_win_faq.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> @@ -22,9 +22,7 @@ </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="build_win_notes.html">Prev</a> </td> - <th width="60%" align="center">Chapter 5. - Building Berkeley DB for Windows - </th> + <th width="60%" align="center">Chapter 5. Building Berkeley DB for Windows </th> <td width="20%" align="right"> <a accesskey="n" href="build_wince.html">Next</a></td> </tr> </table> @@ -42,97 +40,135 @@ <ol type="1"> <li> <span class="bold"> - <strong>My Win* C/C++ application crashes in the Berkeley DB library when Berkeley DB calls -fprintf (or some other standard C library function).</strong> + <strong>My Win* C/C++ application crashes in + the Berkeley DB library when Berkeley DB calls fprintf + (or some other standard C library + function).</strong> </span> - <p>You should be using the "Debug Multithreaded DLL" compiler option in -your application when you link with the -build_windows\Debug\libdb48d.lib library (this .lib file -is actually a stub for libdb48d.DLL). To check this -setting in Visual C++, choose the <span class="emphasis"><em>Project/Settings</em></span> menu -item and select <span class="emphasis"><em>Code Generation</em></span> under the tab marked -<span class="emphasis"><em>C/C++</em></span>; and see the box marked <span class="emphasis"><em>Use runtime -library</em></span>. This should be set to <span class="emphasis"><em>Debug Multithreaded DLL</em></span>. -If your application is linked against the static library, -build_windows\Debug\libdb48sd.lib; then, you will want -to set <span class="emphasis"><em>Use runtime library</em></span> to <span class="emphasis"><em>Debug Multithreaded</em></span>.</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> -Also, using different Visual Studio compilers in the application and -libraries can lead to a crash. So rebuild the application -with the same Visual C++ version as that of the library. -</p> + You should be using the "Debug Multithreaded DLL" + compiler option in your application when you link with + the build_windows\Debug\libdb60d.lib library (this + .lib file is actually a stub for libdb60d.DLL). To + check this setting in Visual C++, choose the + <span class="emphasis"><em>Project/Settings</em></span> menu item + and select <span class="emphasis"><em>Code Generation</em></span> under + the tab marked <span class="emphasis"><em>C/C++</em></span>; and see the + box marked <span class="emphasis"><em>Use runtime library</em></span>. + This should be set to <span class="emphasis"><em>Debug Multithreaded + DLL</em></span>. If your application is linked + against the static library, + build_windows\Debug\libdb60sd.lib; then, you will want + to set <span class="emphasis"><em>Use runtime library</em></span> to + <span class="emphasis"><em>Debug Multithreaded</em></span>. + </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 onle on behalf of the Berkeley DB library). That + violates assumptions made by these libraries, and + traps can result. + </p> + <p> + Also, using different Visual Studio compilers in + the application and libraries can lead to a crash. So + rebuild the application with the same Visual C++ + version as that of the library. + </p> </li> <li> <span class="bold"> - <strong>Why are the build options for DB_DLL marked as "Use MFC in a Shared DLL"? -Does Berkeley DB use MFC?</strong> + <strong>Why are the build options for DB_DLL + marked as "Use MFC in a Shared DLL"? Does Berkeley DB + use MFC?</strong> </span> - <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> + <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> </li> <li> <span class="bold"> - <strong>How can I build Berkeley DB for <a class="ulink" href="http://www.mingw.org" target="_top">MinGW</a>?</strong> + <strong>How can I build Berkeley DB for + <a class="ulink" href="http://www.mingw.org" target="_top">MinGW</a>?</strong> </span> - <p>Follow the instructions in <a class="xref" href="build_unix.html#build_unix_intro" title="Building for UNIX/POSIX">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, and file sizes are limited to 2GB (2^32 bytes.)</p> + <p> + Follow the instructions in <a class="xref" href="build_unix.html#build_unix_intro" title="Building for UNIX/POSIX">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, and file sizes are limited to + 2GB (2^32 bytes.) + </p> </li> <li> <span class="bold"> - <strong>How can I build a Berkeley DB for Windows 98/ME?</strong> + <strong>How can I build a Berkeley DB for + Windows 98/ME?</strong> </span> <p> - Windows 98/ME is no longer supported by Berkeley DB. The following is - therefore only of interest to historical users of Berkeley DB. - </p> - <p> - By default on Windows, Berkeley DB supports internationalized - filenames by treating all directory paths and filenames passed to - Berkeley DB methods as UTF-8 encoded strings. All paths are - internally converted to wide character strings and passed to the - wide character variants of Windows system calls. - </p> - <p> - This allows applications to create and open databases with names - that cannot be represented with ASCII names while maintaining - compatibility with applications that work purely with ASCII paths. - </p> - <p> - Windows 98 and ME do not support Unicode paths directly. To build for - those versions of Windows, either: - </p> + Windows 98/ME is no longer supported by Berkeley + DB. The following is therefore only of interest to + historical users of Berkeley DB. + </p> + <p> + By default on Windows, Berkeley DB supports + internationalized filenames by treating all directory + paths and filenames passed to Berkeley DB methods as + UTF-8 encoded strings. All paths are internally + converted to wide character strings and passed to the + wide character variants of Windows system calls. + </p> + <p> + This allows applications to create and open + databases with names that cannot be represented with + ASCII names while maintaining compatibility with + applications that work purely with ASCII paths. + </p> + <p> + Windows 98 and ME do not support Unicode paths + directly. To build for those versions of Windows, + either: + </p> <div class="itemizedlist"> <ul type="disc"> <li> - <p> - Follow the instructions at - <a class="ulink" href="http://msdn.microsoft.com/en-us/goglobal/bb688166.aspx" target="_top">Microsoft's web site</a>. - </p> + <p> + Follow the instructions at <a class="ulink" href="http://msdn.microsoft.com/en-us/goglobal/bb688166.aspx" target="_top"> + Microsoft's web site</a>. + </p> </li> <li> - <p>Open the workspace or solution file with Visual Studio. Then -open the Project properties/settings section for the project you need to build -(at least db_dll). In the <span class="emphasis"><em>C/C++->Preprocessor->Preprocessor -Definitions</em></span> section, remove <span class="emphasis"><em>_UNICODE</em></span> and -<span class="emphasis"><em>UNICODE</em></span> entries. Add in an entry of -<span class="emphasis"><em>_MBCS</em></span>. Build the project as normal.</p> + <p> + Open the workspace or solution file with + Visual Studio. Then open the Project + properties/settings section for the project + you need to build (at least db_dll). In the + <span class="emphasis"><em>C/C++->Preprocessor->Preprocessor + Definitions</em></span> section, remove + <span class="emphasis"><em>_UNICODE</em></span> and + <span class="emphasis"><em>UNICODE</em></span> entries. Add + in an entry of <span class="emphasis"><em>_MBCS</em></span>. + Build the project as normal. + </p> </li> </ul> </div> - <p>The ASCII builds will also work on Windows NT/2K/XP/2003 and Windows7, but will -not translate paths to wide character strings.</p> + <p> + The ASCII builds will also work on newer versions of + Windows, but will not translate paths to wide character + strings. + </p> </li> </ol> </div> @@ -152,9 +188,7 @@ not translate paths to wide character strings.</p> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> - <td width="40%" align="right" valign="top"> Chapter 6. - Building Berkeley DB for Windows Mobile - </td> + <td width="40%" align="right" valign="top"> Chapter 6. Building Berkeley DB for Windows Mobile </td> </tr> </table> </div> |