'Application':不是类或命名空间名称

时间:2016-05-16 19:11:43

标签: winforms visual-studio c++-cli crypto++ managed-c++

我正在尝试在C ++表单应用程序上使用Cryptopp AES库。使用Visual Studio 2015和Update 2。

问题是我必须使用“No common Runtime Support”。但是当我这样做时,它给了我一些错误,比如:

Severity    Code    Description Project File    Line    Suppression State
Error   C2653   'Application': is not a class or namespace name SON c:\Users\Win\documents\visual studio 2015\Projects\SON\SON\MyForm.cpp   18  

Severity    Code    Description Project File    Line    Suppression State
Error   C2871   'Data': a namespace with this name does not exist   SON c:\users\win\documents\visual studio 2015\projects\son\son\MyForm.h 9   

Severity    Code    Description Project File    Line    Suppression State
Error   C2871   'Drawing': a namespace with this name does not exist    SON c:\users\win\documents\visual studio 2015\projects\son\son\MyForm.h 10  

Severity    Code    Description Project File    Line    Suppression State
Error   C3861   'EnableVisualStyles': identifier not found  SON c:\Users\Win\documents\visual studio 2015\Projects\SON\SON\MyForm.cpp   18  

但是,当我使用公共语言运行时支持构建代码时,它不会产生任何错误,但这次我无法为Form App创建UI。

以下是我的CPP代码,我没有对其进行任何更改

#include "MyForm.h"
#include <iostream>
#include <string>

using namespace System;
using namespace System::Windows::Forms;

#include "C:\Users\Win\Desktop\cryptopp562\osrng.h"
using CryptoPP::AutoSeededRandomPool;



[STAThread]
void Main(array<std::string^>^ args)
{
    Application::EnableVisualStyles();
    Application::SetCompatibleTextRenderingDefault(false);

    MyForm form;
    Application::Run(%form);
}

提前致谢。

0 个答案:

没有答案