Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

compile error C2244

I inherited some ancient project (old hardware w/ Win98) that I need to compile for newer hardware and OS (new hardware w/ Win XP).  Would still like to keep in VC++ 6.0 till I get it built and running, then port to C# .NET.

Problem is that the build environment was not available so I am building a new one.

The error is:

Compiling...
StdAfx.cpp
c:\projects\test\mrm\nivector.inl(638) : error C2244: 'CNiVectorT<DataType>::[]' : unable to resolve function overload
c:\projects\test\mrm\nivector.inl(641) : error C2954: template definitions cannot nest
c:\projects\test\mrm\nivector.inl(665) : error C2244: 'CNiVectorT<DataType>::[]' : unable to resolve function overload
c:\projects\test\mrm\nivector.inl(667) : error C2954: template definitions cannot nest
c:\projects\test\mrm\nivector.inl(691) : error C2244: 'CNiVectorT<DataType>::[]' : unable to resolve function overload
c:\projects\test\mrm\nivector.inl(694) : error C2954: template definitions cannot nest
c:\projects\test\mrm\nivector.inl(718) : error C2244: 'CNiVectorT<DataType>::[]' : unable to resolve function overload
c:\projects\test\mrm\nivector.inl(721) : error C2954: template definitions cannot nest
c:\projects\test\mrm\nigenericvector.h(195) : error C2143: syntax error : missing ';' before '<'
c:\projects\test\mrm\nigenericvector.h(251) : see reference to class template instantiation 'NI::CNiGenericVector<DataType>' being compiled
c:\projects\test\mrm\nigenericvector.h(195) : fatal error C1903: unable to recover from previous error(s); stopping compilation
c:\projects\test\mrm\nigenericvector.h(251) : see reference to class template instantiation 'NI::CNiGenericVector<DataType>' being compiled
Error executing cl.exe.
Creating browse info file...
BSCMAKE: error BK1506 : cannot open file '.\Debug\StdAfx.sbr': No such file or directory
Error executing bscmake.exe.

MRMTest.exe - 11 error(s), 0 warning(s)

I originally started with just the c++ code then added the Ni headers and inl files as they appeared while compiling which leads me to these errors.  By looking at the code all looks correct, so it is something missing (pre-compiled code?)....

Anyone know what and how to fix the error??

Thanks,

Fido

0 Kudos
Message 1 of 2
(6,906 Views)

Here are three ideas:

1) Does the project you have include a file named "NiIncludes.h"? This file would be in the project's main directory (i.e. not the Measurement Studio directory). If you have this file, try including it in your stdafx.h file instead of the individual Measurement Studio headers.

2) Use the Measurement Studio project wizard (inside VC6, choose File>>New>>Projects>>NI Measurement Studio AppWizard) to create a new project/build environment and add your source files to it.

3) This might be a namespace issue. Assuming that you are adding the Measurement Studio header and inline files to stdafx.h, try adding the following line to the bottom of the stdafx.h file:

using namespace NI;

 

Let us know how any of these ideas work out.

David Rohacek
National Instruments

0 Kudos
Message 2 of 2
(6,899 Views)