11-02-2009 02:57 AM
Could not declare a CNiTimer variable in a *view.h header file?
I launch a MDI VC2005 project with NI measurement studio extention. I check out the "TemperatureSystemSDI.2005" example project. It works very well.
But when I use the following declarations in *view.h, compile errors are reported:
Code:
class CVAView : public CFormView
{...
public:
CNiTimer* m_pTimer;
...
}
Error:
C2143, C4430.
At the first beginning, I guess the error may occure when lacking of header file include. But when I include the following headers, there still exist compile errors.
Code:
#include "NiGraph.h"
#include "NiSlide.h"
#include "NiTimer.h"
This time the compile errors are:
C2440,C2548, C2143, C4430, even more than the case of not including these headers.
I don't know what's wrong. I just declare a CNiTimer varible! Would you plz help me .
Solved! Go to Solution.
11-02-2009 12:19 PM
Either add #include "NiUtilityComponent.h" or use the Measurement Studio Add/Remove Class Library wizard (in the Measurement Studio menu inside Visual Studio) to add a reference to the Utility class library. The *Component.h files aggregate all of the necessary header and library includes for a particular Measurement Studio C++ library.
If this doesn't work, please attach your project and we'll take a look at it.
David Rohacek
National Instruments