本文介绍了使用windows sdk进行kinect应用的一个解决方案的多项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好, 

我现在遇到一个问题,因为我的解决方案中有3个主要项目分别是P1,P2和P3。基本上,P1是MFC SDI,它也是此解决方案的起始项目。另外两个,P2和P3,都是具有标准
C ++格式的CLR库。

I am now confronting a issue, as there are 3 major projects in my solution which are P1, P2 and P3 respectively. Basically, P1 is a MFC SDI, which is also the starting project for this solution. The other two, P2 and P3, are all CLR libraries with standard C++ format.

有一个基本的调用程序,即P1-> P2-> P3 ,这意味着在P1中,我包括P2,在P2中,我包括P3。 

There is a basically calling procedure, which is P1->P2->P3, which means in P1, I include P2, and in P2, I include P3. 

现在我将P3视为驱动Kinect与MS的驱动程序类。 SDKS,我已经为诸如附加包含,附加libariy或其他依赖等内容做好了准备。而且,在P2的cpp文件中,我做了以下内容:

Now I am regarding P3 as a driver class to drive the Kinect with MS. SDKS, and I have already set well for things such as additional include, additional libariy, or additional dependencies, etc. And also, in the cpp file of P2, I did the following:

#include< Windows.h>

#include< NuiApi.h>

#include< Shlobj.h>

#include <Windows.h>
#include <NuiApi.h>
#include <Shlobj.h>

基本上,情况是,如果我只重建P3,没有错。但是如果我重建P2,其中包括P3,那就有很多错误,例如:

Basically, the situation is that if I only rebuild P3, nothing wrong. But if I rebuild P2, which includes P3, there are full of wrongs, for example:

错误C2146:语法错误:在标识符'INuiAudioBeam'之前缺少';'

error C2146: syntax error : missing ';' before identifier 'INuiAudioBeam'

错误C4430:缺少类型说明符 - 假定为int。注意:C ++不支持default-int

error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

错误C2146:语法错误:在标识符'INuiFrameTexture'之前缺少';'

error C2146: syntax error : missing ';' before identifier 'INuiFrameTexture'

所以我想知道你们中是否有人提出更具体的知识?

So I am wondering whether there is any suggestions from anyone of you with much more specific knowledge?

如果有的话,请告诉我,因为我真的很着急。

If so, do pls tell me, as I am really anxious.

非常感谢。

推荐答案

#include< windows.h>

#include< objbase.h>

#include< NuiApi.h>    ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; // 包括目录:

#include <windows.h>
#include <objbase.h>
#include <NuiApi.h>             // Include Dir:



这篇关于使用windows sdk进行kinect应用的一个解决方案的多项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 23:23