10-05-2017 12:18 PM
I need to build a LabWindows application with linking prebuilt libraries (.lib) that were built with VS2010. One of the .lib libraries is using function in fcntl.h that is not included in the LabWindows C run time environment. Is there a way to force LabWindows to use VS2010 Windows C Run Time environment? I tried to import msvcrtd.lib from VS2010 but I get the following error:
3 Project link errors
Bad header encountered while reading external module: 'f:\dd\vctools\crt_bld\SELF_X86\crt\prebuild\build\INTEL\dll_obj\tcmap\_mbccpy.obj'.
Aborted load of member "f:\dd\vctools\crt_bld\SELF_X86\crt\prebuild\build\INTEL\dll_obj\tcmap\_mbccpy.obj" from library "c:\Users\ahallajp\Documents\LabWindowsProjects\VS2010\msvcrtd.lib".
Aborted load of library "c:\Users\ahallajp\Documents\LabWindowsProjects\VS2010\msvcrtd.lib".
10-06-2017 03:34 PM
Hi ah80,
Instead of forcing LabWindows/CVI to use the Visual Studio 2010 C Runtime Environment, have you tried including the fcntl.h in your LabWindows/CVI application?
10-06-2017 03:50 PM
I'm getting a link error (undefined symbol) which indicates the definition of functions are missing. Including the fcntl.h header file will not solve the issue. I need to link a library that contains the definition of the functions in fcntl.h
I did try to use the DLL import generation capability in labwindows in order to create a .lib library from the Windows C Runtime DLL hoping that might link successfully but that didn't work either. There are syntax in windows header files that labwindows compiler does not recognize.
10-09-2017 03:35 PM
Hi ah80,
Do you have the source code for these libraries built with VS2010? Would it be possible to recreate them in LabWindows/CVI?
Also, would you be able to provide some information on the background of these libraries? Were they created in ANSI C?
10-13-2017 09:41 AM
No, I don't have the source code to the VS2010 libraries. They are third party libraries provided by a vendor and they don't distribute the source code.
Update on the issue:
I tried experimenting with newer versions of LabWindows and I was finally able to link the VS2010 C run time library using LabWindows 2017.