내가 비주얼 C++ 프로젝트를 사용하고혼합 유형
#pragma once
using namespace UsbLibrary;
ref class MissileLauncher
{
public:
MissileLauncher(void);
private:
//Bytes used in command
unsigned char UP[10];
unsigned char RIGHT[10];
unsigned char LEFT[10];
unsigned char DOWN[10];
unsigned char FIRE[10];
unsigned char STOP[10];
unsigned char LED_OFF[9];
unsigned char LED_ON[9];
UsbHidPort USB;
};
다음 헤더 파일에서 참조하시기 바랍니다 지원되지 않습니다 (C++/CLI?) 비주얼 스튜디오 전문 2010 년에이 코드를 실행하면 I 오류의 많은
다음Error 1 error C4368: cannot define 'UP' as a member of managed 'MissileLauncher': mixed types are not supported
Error 2 error C4368: cannot define 'RIGHT' as a member of managed 'MissileLauncher': mixed types are not supported
Error 3 error C4368: cannot define 'LEFT' as a member of managed 'MissileLauncher': mixed types are not supported
Error 4 error C4368: cannot define 'DOWN' as a member of managed 'MissileLauncher': mixed types are not supported
Error 5 error C4368: cannot define 'FIRE' as a member of managed 'MissileLauncher': mixed types are not supported
Error 6 error C4368: cannot define 'STOP' as a member of managed 'MissileLauncher': mixed types are not supported
Error 7 error C4368: cannot define 'LED_OFF' as a member of managed 'MissileLauncher': mixed types are not supported
Error 8 error C4368: cannot define 'LED_ON' as a member of managed 'MissileLauncher': mixed types are not supported
이 네임 스페이스 USBLibrary
는 C#을 DLL 파일에서 오는을 얻을. UsbHidPort;
은 C# dll의 객체입니다
그래서이 오류가 발생하는 이유는 무엇입니까? 어떤 아이디어?
(http://blogs.msdn.com/b/branbray/archive/2005를 /07/20/441099.aspx)는 네이티브 형식, 관리되는 형식 및 시간/방법/방법을 설명합니다. 약간 날짜이지만, 그 핵심은 당신에게 가지고있는 문제, 왜 그것을 가지고 있는지, 그리고 그것에 대해 할 수있는 일을 보여줄 것입니다. – WhozCraig