m4_comment([$Id: faq.so,v 10.37 2007/05/30 08:39:08 alexg Exp $]) m4_ref_title(Building m4_db for Windows systems, Windows FAQ, [@building for Windows FAQ, building for @Windows FAQ], build_win/notes, build_wince/intro) m4_nlistbegin m4_nlist([dnl m4_bold([dnl Why do I have db_load.dll - where is db_load.exe?]) m4_p([dnl 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 m4_linkweb( [http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q321274&], [Microsoft's article about this bug]).]) m4_p([dnl The workaround is simply to switch the m4_bold(db_load) project back to generating an EXE after converting to VC++ .NET. To do this, right click on db_load -__GT__ Properties and change "Configuration Type" from "Dynamic Library (.dll)" to "Application (.exe)".])]) m4_nlist([dnl m4_bold([dnl My Win* C/C++ application crashes in the m4_db library when m4_db calls fprintf (or some other standard C library function).]) m4_p([dnl You should be using the "Debug Multithreaded DLL" compiler option in your application when you link with the build_windows\Debug\libdb[]M4MAJOR[]M4MINOR[]d.lib library (this .lib file is actually a stub for libdb[]M4MAJOR[]M4MINOR[]d.DLL). To check this setting in Visual C++, choose the m4_italic(Project/Settings) menu item and select m4_italic(Code Generation) under the tab marked m4_italic(C/C++); and see the box marked m4_italic(Use runtime library). This should be set to m4_italic(Debug Multithreaded DLL). If your application is linked against the static library, build_windows\Debug\libdb[]M4MAJOR[]M4MINOR[]sd.lib; then, you will want to set m4_italic(Use runtime library) to m4_italic(Debug Multithreaded).]) m4_p([dnl 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 m4_db library). That violates assumptions made by these libraries, and traps can result.])]) m4_nlist([dnl m4_bold([dnl Why are the build options for DB_DLL marked as "Use MFC in a Shared DLL"? Does m4_db use MFC?]) m4_p([dnl m4_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 m4_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.])]) m4_idefz(configuring for @MinGW) m4_nlist([dnl m4_bold([dnl How can I build m4_db for m4_linkweb(http://www.mingw.org, MinGW)?]) m4_p([dnl Follow the instructions in m4_linkpage(M4RELDIR/ref/build_unix/intro, Building for UNIX/POSIX), 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.])]) m4_nlistend m4_page_footer