DOCUMENT:Q120193 05-MAY-2001 [utilities] TITLE :PRB: U1150 Error From the LIB Utility PRODUCT :Microsoft Programming Utilities PROD/VER::1.0,1.5 OPER/SYS: KEYWORDS:kb16bitonly kbprb ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - The Microsoft Library Manager (LIB.EXE), used with: - Microsoft Visual C++, versions 1.0, 1.5 ------------------------------------------------------------------------------- SYMPTOMS ======== When you build a Static Library (.LIB) from the Visual Workbench, the following error message may be returned: LIB Fatal Error U1150 page size too small; use option /PAGE:n to increase it There is no way to modify the "LIB" command line within the Visual Workbench. RESOLUTION ========== There is a relatively simple workaround for this problem. All you need to do is find the inference rule within the makefile generated by Visual Workbench that causes the LIB utility to be run. There, you can change the command line that is passed to the LIB utility. To do this, open the makefile in a text editor and search for the $(PROJ).LIB: inference rule. When that inference rule is evaluated, it creates a LIB response file called "$(PROJ).CRF", which contains the command-line switches as well as the responses for the LIB utility's prompts. The /PAGESIZE option is set to 64, and it can be found somewhere between the pair of "<<" symbols. All that needs to be done is to change that default value from 64 to a power of 2 that is greater than 64 and is less than or equal to 32768 (such as 128, 256, 512, 1024, 2048, 4096, and so forth). NOTE: /PAGESIZE:64 is the hard-coded default used by the Visual Workbench when building a static library. There is one important caveat here, however: When you use the internal build engine of the Visual Workbench, the inference rule portion of the makefile is not used. Instead, the Visual Workbench uses the inference rules only when the file is opened as an external makefile. For this solution to work, the makefile must be opened as an external makefile in the Visual Workbench or the library must be built with NMAKE from the command line. MORE INFORMATION ================ The page size of a library sets the alignment of modules stored in the library. Modules start at locations that are a multiple of the page size from the beginning of the file. When the page size is too small, the U1150 error occurs. REFERENCES ========== For further information, see the documentation for the LIB utility, located in the LIB.WRI file in the MSVC\HELP directory. Additional query words: 1.00 1.50 page size VWB ====================================================================== Keywords : kb16bitonly kbprb Technology : kbVCsearch kbAudDeveloper kbLibSearch Version : :1.0,1.5 Issue type : kbprb ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 2001.