Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Link errors 2005 and 2001 after conversion to Meas Studio 6.0

My VC++6 project uses componentworks GUI controls 1.0 and used to compile and run just fine. But now right after conversion to the Measurement Studio 6.0, my project gets the following linking errors (please help):


Linking...
LINK : warning LNK4075: ignoring /EDITANDCONTINUE due to /INCREMENTAL:NO specification
LIBCD.lib(fpinit.obj) : error LNK2005: __ldused already defined in a previous module
LIBCD.lib(fpinit.obj) : error LNK2005: __fltused already defined in a previous module
LIBCD.lib(crt0dat.obj) : error LNK2005: _exit already defined in msvcrt.lib(MSVCRT.dll)
LIBCD.lib(crt0dat.obj) : error LNK2005: __exit already defined in msvcrt.lib(MSVCRT.dll)
LIBCD.lib(dbgheap.obj) : error LNK2005: _malloc already defined in msvcrt.lib(MSVCRT.dll)
LIBCD.lib(dbgheap.obj) : error LNK2005: _free already defined in msvcrt.lib(MSVCRT.dll)
LIBCD.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in msvcrt.lib(cinitexe.obj)
LIBCD.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in msvcrt.lib(cinitexe.obj)
LIBCD.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in msvcrt.lib(cinitexe.obj)
LIBCD.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in msvcrt.lib(cinitexe.obj)
LIBCD.lib(winxfltr.obj) : error LNK2005: __XcptFilter already defined in msvcrt.lib(MSVCRT.dll)
msvcrt.lib(MSVCRT.dll) : error LNK2005: __setmbcp already defined in LIBCD.lib(mbctype.obj)
LINK : warning LNK4098: defaultlib "msvcrt.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib "LIBCD" conflicts with use of other libs; use /NODEFAULTLIB:library
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Release/iMap.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

FYI, during installation of Measurement Studio 6.0, I only installed the module for VC++, not the other two (VB and LabWindows/CVI) because install of the CVI module kept getting errors. Do I need the LabWindows installed to eliminate the above link errors?
0 Kudos
Message 1 of 6
(3,358 Views)
Try these steps:


  1. In Visual C++, go to the Project menu, then click Settings.

  2. Click the Link tab.

  3. Select the Input option in the Category drop-down list.

  4. Enter libc in the Ignore libraries textbox.

  5. Click OK, then rebuild the project.



This should fix your problem. Also note that you'll need to configure this setting for each configuration (debug/release/etc) in your project.

- Elton
0 Kudos
Message 2 of 6
(3,358 Views)
Hello

If possible, I would like to see if this problem is reproducible on my system here as well. I'm assuming you used the conversion wizard to upgrade the project. The wizard should have taken care of this problem.

You can email in the project to support thru http://ni.com/ask, and add my name in the subject so I'll know to look out for it. If this is reproducible, it would need to be looked into.

Thanks

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 3 of 6
(3,358 Views)
Hi Elton,
Thanks for your suggestion; however, I tried exactly as you said, but I still get the same errors. I made sure and tried all the different build configurations. All still get same errors. Any other suggestions, please? Do you think maybe it's because I don't have the LabWindows/CVI components installed?
Thanks.
0 Kudos
Message 4 of 6
(3,358 Views)
Hi Bilal,
Thanks for your attention.
Unfortunately, I cannot send you my source project because it's my company's IP. I guess it was the conversion wizard that made the conversion; all I know is, after I installed my MeasStudio 6 and then open my VC++ source project, it asked me if I want to convert the current 1.0 project to 6.0 project and I'd click OK and it'd convert it. That's all. Is that the same as if I actively click on the conversion wizard?

Please advise.
R//AC
0 Kudos
Message 5 of 6
(3,358 Views)
This could be affected by the version of the C run-time that you were using in your project. Try libcmt in the Ignore libraries instead of libc. Are you using any CVI libraries in your Visual C++ project? If not, I think it's very unlikely that not having the CVI libraries installed is affecting your build.

- Elton
0 Kudos
Message 6 of 6
(3,358 Views)