Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

trouble migrating from visual c++ 6.0 to .NET

I am moving my project from Visual C++ 6.0 + Measurement Studio 6.0 to Visual .NET + Measurement Studio 7.1. I installed Measurement Studio 7.1 in a differnt directory (c:\program files\new national instruments\). When I compile the migrated project, it had several of NI class related error as follows:

Linking...
WriteDir.obj : error LNK2001: unresolved external symbol "public: __thiscall NI::CNiString::CNiString(class ATL::CStringT > > const &)" (??0CNiString@NI@@QAE@ABV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@@Z)

ZPlotDlg.obj : error LNK2019: unresolved external symbol "public: __thiscall NI::CNiString::CNiString(class ATL::CStringT > > const &)" (??0CNiString@NI@@QAE@ABV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@@Z) referenced in function "unsigned int __stdcall ATL::_AtlGetThreadACPThunk(void)" (?_AtlGetThreadACPThunk@ATL@@YGIXZ)

TubeTemplate.obj : error LNK2001: unresolved external symbol "public: __thiscall NI::CNiString::CNiString(class ATL::CStringT > > const &)" (??0CNiString@NI@@QAE@ABV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@@Z)


This is just examples that I cut and paste. I actually have 138 NI class related errors. What could be wrong? How do I fix this problem?

Thanks,
Yajai.
0 Kudos
Message 1 of 5
(4,439 Views)
I'm not sure myself what might be the cause. According to MS it could be many issues:

http://support.microsoft.com/default.aspx?scid=kb;en-us;138400

and

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/LNK2001.asp

Sorry I can't help further.

Message Edited by WantToGolf on 04-19-2005 10:08 AM

Message 2 of 5
(4,434 Views)
Hi Yajai,

To me it looks like that there are some of the NI resources missing or not linked properly. I would suggest creating a new Measurement project in .NET and adding your code files to that project. This should take care of most of the link errors.

The Microsoft resources provided by WantToGolf also provides good information on these errors and will help you understand why these error occur. Also, did you use the VS.NET upgrade wizard to migrate your 6.0 code to .NET code?

I hope this helps,
Rajiv G
Message 3 of 5
(4,419 Views)
The definitions of CString class has changed from VC 6.0 to VC 7.1. I ended up having to re-compile some lower level libraries in order to link properly. Although this KB article is directed at a different VS2002 to VS2003 issue, you might check the follwing from Microsoft for some background info on the subject.

MSDN PRB:309801
0 Kudos
Message 4 of 5
(4,407 Views)
A very interesting obervation by Zambiniman. I think this should solve the problem with CString. The microsoft KB adresses a very similar situation.

I would say that the CNiString would be having a similar problem and you probably will need to compile the low level include files again. But since you installed MStudio 7.1 and new VS.NET, I think this error should be fixed by just having a correct link for the new include file, which is missed during migration of VS 6.0 code to VS.NET code.

Rajiv G
0 Kudos
Message 5 of 5
(4,396 Views)