I'm new to C++, I have a Visual C++ project in Visual Studio 2008 (stuck with it I'm afraid) and I'm trying to get unit tests to work. I've got my code and I've got my new test project set up but any time I include the header file of the code I want to test, I get 138 compilation errors.
#include "stdafx.h"
//#include "../ProjName/ProjName.h"
using namespace System;
using namespace System::Text;
using namespace System::Collections::Generic;
using namespace Microsoft::VisualStudio::TestTools::UnitTesting;
namespace TestProjName
{
...various code created by the wizard...
[TestMethod]
void Test1()
{
Assert::AreEqual(0,1);
};
};
My code compiles (and runs) fine until the #include to my ProjName is uncommented. When it is uncommented, I get a lot of errors from the VS libraries along the lines of:
1>c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\vadefs.h(89) : error C4956: 'va_list *' : this type is not verifiable
,
1>c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\crtdefs.h(2027) : error C4956: 'threadlocaleinfostruct *' : this type is not verifiable
and
1>c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\wchar.h(235) : error C2337: 'SA_Post' : attribute not found
Has anyone come across this before? Might anyone suggest a (probably simple) thing I'm overlooking?
Aucun commentaire:
Enregistrer un commentaire