DOCERR: Missing Visual C/C++ "Multithreaded Using DLL" SettingLast reviewed: October 10, 1997Article ID: Q137059 |
3.00
WINDOWS
kbtool kbdocerr
The information in this article applies to:
SUMMARYIn the Microsoft Visual FoxPro "Professional Features Guide," Chapter 11, pages 188-189, instructions for compiling and linking a C library written with the Library Construction Kit are given for Microsoft Visual C++, 32-bit Edition, version 2.0. These instructions omit an important setting for the project - what library the linker should use to resolve external references and what run-time library the DLL (FLL) to look for when it is run. The missing setting is the Use Run-Time Library setting under the Code Generation category and it should be set to "Multithreaded using DLL." NOTE: This was corrected in the Visual FoxPro 3.0b for Windows documentation.
MORE INFORMATION
Help File DocumentationThis missing setting is also documented the Visual FoxPro Help file. To find this topic quickly, do the following:
Correction to to Printed DocumentationTo establish the "Multithreaded using DLL" setting, follow the steps shown at the bottom of page 188 of the "Professional Features Guide." Between steps 4 and 5 under the "To establish project settings" heading, change the Use Run-Time Library drop-down list box to "Multithreaded using DLL." These steps are reproduced below with the additional step shown as step 4a: To establish project settings:
using DLL. winapims.lib The following error is known to occur when linking the DLL or FLL in Microsoft Visual C++ version 2.0:
error LNK2005: _memmove already defined in LIBCMT.lib(memove.obj)See the "Steps to Reproduce Error Message" section of this article for the steps that generate this error message, if you haven't . The following information on the Use Run-Time Library setting is from the Microsoft Visual C++ Help file on CD-ROM (Books Online): When you use the Run-Time Library, the following options enable you to:
Single-threaded (Libc.lib)Causes the compiler to place the library name Libc.lib into the object file so that the linker will use Libc.lib to resolve external symbols. This is the compiler's default action. Libc.lib does not provide multi-thread support. Command-line equivalent: /ML
Multi-threaded (Libcmt.lib)Defines _MT so that multi-thread-specific versions of the run-time routines are selected from the standard header files. It also causes the compiler to place the library name Libcmt.lib into the object file so that the linker will use Libcmt.lib to resolve external symbols. Either /MT or /MD is required to create multi-threaded programs. Command-line equivalent: /MT
Multi-threaded Using DLL (Msvcrt.lib)Defines _MT and _DLL so that both multi-thread- and DLL-specific versions of the run-time routines are selected from the standard header files. It also causes the compiler to place the library name Msvcrt.lib into the object file. Command-line equivalent: /MD Applications compiled with this option are statically linked to Msvcrt.lib. This library provides a layer of code that allows the linker to resolve external references. The actual working code is contained in Msvcrt20.dll, which must be available at run time to applications linked with Msvcrt.lib You can substantiate this information by following these steps:
Steps to Reproduce Error Message
|
Additional reference words: 3.00 VFoxWin lck api
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |