Linker Errors When Using LabWindows/CVI Static Libraries and Object Files in Microsoft Visual Studio 2005Primary Software: LabWindows/CVI Development Systems>>Full Development SystemPrimary Software Version: 8.0.1 Primary Software Fixed Version: N/A Secondary Software: LabWindows/CVI Development Systems>>Base Package
Problem: When I try to use a LabWindows/CVI-generated .obj or .lib file in Microsoft Visual C 2005, without using the LabWindows/CVI Conversion Wizard, I get an error that says the linker could not find libc.lib. This did not happen with previous versions of Visual Studio. How do I fix this error? Solution: Microsoft removed support for its single-threaded C run-time library (libc.lib) in Visual Studio 2005. By default, libraries built with previous versions of Visual Studio try to link with libc.lib through linker directives. The external compiler support libraries for the LabWindows/CVI Run-Time Engine were generated using Visual Studio. By default, these libraries try to link to the single-threaded C run-time library when they are included in a Visual C project. For a list of the external compiler support libraries for the LabWindows/CVI Run-Time Engine, refer to the Using LabWindows/CVI Libraries in External Compilers topic in the LabWindows/CVI Help. To correct the linker error, you must specify that the Visual C linker ignore the single-threaded C run-time library (libc.lib). In order to do this, complete the following steps to add /NODEFAULTLIB:libc to your Visual C linker options: 1. In Visual Studio, select Project»Properties. 2. Expand the properties tree to the Configuration Properties»Linker»Input item. 3. Add libc.lib in the Ignore Specific Library option. Note: If you use the LabWindows/CVI Conversion Wizard, the wizard automatically completes these steps for you . Also, you will not get the linker error if you use an import library for a LabWindows/CVI DLL. Related Links: MSDN: C Run-Time Libraries Attachments:
Report Date: 02/13/2006 Last Updated: 04/21/2006 Document ID: 3TTHO2ZW |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
