The information in this article applies to:
SUMMARY
When you build a static library (.LIB file) with Visual Workbench, the
default project options build a static library for the Microsoft
Windows operating system. The documentation does not explicitly
indicate this fact.
Building a Static Library for MS-DOS with 16-bit Visual WorkbenchWhen you build a static library for MS-DOS, you must remove the /GA compiler option switch. To do so, choose Project from the Visual Workbench Options menu, then choose the Compiler button. Select the Windows Prolog/Epilog category and choose the None option in the "Generate Prolog/Epilog For" box. Then choose OK to change the project options.NOTE: Removing the /GA leaves no preprocessor definition for the target platform. Specifically, removing /GA also removes /D "_WINDOWS", since /D "_WINDOWS" is forced by /GA. If you remove /GA, you also need to add /D "_DOS", or else compilation errors will occur in the preprocessing of standard headers, such as AFX.H. Building a Console Static Library with Visual Workbench 1.1When you build a console library, you must remove the /D "_WINDOWS" option from the list of compiler options. To do so, choose Project from the Visual Workbench Options menu, then choose the Compiler button. Select the Preprocessor category and remove the string _WINDOWS from the "Symbols and Macros to Define" edit control. Then choose OK to change the project options.Building a Console Static Library with Visual Workbench 2.x and 4.0When you build a console library, you must remove the /D"_WINDOWS" option from the list of compiler options. To do so with the Visual WorkBench version 4.0, choose Settings... from the Build menu; to do do with the Visual WorkBench version 2.x, choose Settings from the Project menu. For both versions, choose the C/C++ tab. In the Visual WorkBench version 4.0, select the General category; in the Visual WorkBench version 4.0, select the Preprocessor category. For both versions, remove the string _WINDOWS from the "Preprocessor Definitions" edit control. Choose OK to save the new project options.NOTE: 32-bit Import libraries are created by LINK when it builds a program or DLL that contains exports. 16-bit Import libraries are build using IMPLIB. Additional query words:
Keywords : kbide kbVC100 kbVC150 kbVC151 kbVC152 kbVC200 kbVC210 kbVC400 kbVC500 |
Last Reviewed: July 6, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |