DirectX中的例子怎么编译的?

SmallBigCat 2004-09-19 09:37:19
安装了DirectX9.0b,在DirectX Sample Browser中点击“Project Files”编译正常,而把project拷贝到其他目录则编译不通过,是何原因?请有经验的兄弟说说;

我的机器是Win200 + VC6;
...全文
158 14 打赏 收藏 转发到动态 举报
写回复
用AI写文章
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
iamltq 2004-10-08
  • 打赏
  • 举报
回复
你要在include 路径设置中,添加
D:\DXSDK\Include
D:\DXSDK\SAMPLES\C++\DIRECTSHOW\BASECLASSES
在Library路径设置中,添加
D:\DXSDK\Lib
D:\DXSDK\SAMPLES\C++\DIRECTSHOW\BASECLASSES\RELEASE
D:\DXSDK\SAMPLES\C++\DIRECTSHOW\BASECLASSES\DEBUG
并将这些路径置于最上端。
iamltq 2004-10-08
  • 打赏
  • 举报
回复
你要在include 路径设置中,添加
D:\DXSDK\Include
D:\DXSDK\SAMPLES\C++\DIRECTSHOW\BASECLASSES
在Library路径设置中,添加
D:\DXSDK\Lib
D:\DXSDK\SAMPLES\C++\DIRECTSHOW\BASECLASSES\RELEASE
D:\DXSDK\SAMPLES\C++\DIRECTSHOW\BASECLASSES\RELEASE
并将这些路径置于最上端。
SmallBigCat 2004-09-26
  • 打赏
  • 举报
回复
我当然知道BaseClass的include在其目录下,好歹我也是用VC++开发5、6年了;但还是照样出错
蒋晟 2004-09-23
  • 打赏
  • 举报
回复
D:\DXSDK\INCLUDE,D:\DXSDK\LIB不是BaseClass的,BaseClass的include在其目录下
SmallBigCat 2004-09-22
  • 打赏
  • 举报
回复
即使不作任何改动,只是把PlayCap目录复制到D:\DXSDK\Samples\C++\DirectShow\下,居然也编译出错,出错情形与上面相同;

真TMD不可思议;
SmallBigCat 2004-09-22
  • 打赏
  • 举报
回复
把BaseClasses的路径加进去,也是编译出现错误;D:\DXSDK\INCLUDE,D:\DXSDK\LIB;都分别加在了VC6的应引用和库目录中;
SmallBigCat 2004-09-22
  • 打赏
  • 举报
回复
情况是这样的:
我的DXSDK安装在D:\DXSDK;直接打开D:\DXSDK\Samples\C++\DirectShow\Capture\PlayCap\PlayCap.dsw,则VC6可以编译通过;

而把PlayCap一整个目录复制到D:\根目录再编译,则编译出错;结果如下:

--------------------Configuration: PlayCap - Win32 Release--------------------
Compiling...
playcap.cpp
D:\PlayCap\playcap.cpp(39) : error C2143: syntax error : missing ';' before '*'
D:\PlayCap\playcap.cpp(39) : error C2501: 'ICaptureGraphBuilder2' : missing storage-class or type specifiers
D:\PlayCap\playcap.cpp(39) : error C2501: 'g_pCapture' : missing storage-class or type specifiers
D:\PlayCap\playcap.cpp(57) : error C2227: left of '->SetFiltergraph' must point to class/struct/union
D:\PlayCap\playcap.cpp(87) : error C2227: left of '->RenderStream' must point to class/struct/union
D:\PlayCap\playcap.cpp(218) : error C2065: 'CLSID_CaptureGraphBuilder2' : undeclared identifier
D:\PlayCap\playcap.cpp(219) : error C2065: 'IID_ICaptureGraphBuilder2' : undeclared identifier
D:\PlayCap\playcap.cpp(276) : error C2227: left of '->Release' must point to class/struct/union
D:\PlayCap\playcap.cpp(364) : error C2065: 'DWORD_PTR' : undeclared identifier
D:\PlayCap\playcap.cpp(364) : error C2146: syntax error : missing ')' before identifier 'pUnkGraph'
D:\PlayCap\playcap.cpp(365) : error C2059: syntax error : ')'
D:\PlayCap\playcap.cpp(434) : error C2065: 'LONG_PTR' : undeclared identifier
D:\PlayCap\playcap.cpp(434) : error C2059: syntax error : ')'
D:\PlayCap\playcap.cpp(435) : error C2143: syntax error : missing ';' before '{'
D:\PlayCap\playcap.cpp(479) : error C2146: syntax error : missing ')' before identifier 'hwnd'
D:\PlayCap\playcap.cpp(479) : error C2059: syntax error : ')'
Error executing cl.exe.

PlayCap.exe - 16 error(s), 0 warning(s)
idAnts 2004-09-21
  • 打赏
  • 举报
回复
他有一些公共的头文件,不是sdk的,而是那些例子s所公用的.是不是那个路径不对.
蒋晟 2004-09-21
  • 打赏
  • 举报
回复
把BaseClasses添加到包含路径里面去
CodeProject-Jerry 2004-09-21
  • 打赏
  • 举报
回复
看上面的连接
告诉你怎么设置VC
CodeProject-Jerry 2004-09-21
  • 打赏
  • 举报
回复
Direct3D 跟我学[第一讲]
http://hao.kjz.cn/xml/040921162904.xml

Direct3D 跟我学[第二讲]
http://hao.kjz.cn/xml/040921171003.xml
SmallBigCat 2004-09-20
  • 打赏
  • 举报
回复
cngonet 2004-09-20
  • 打赏
  • 举报
回复
看看什么错误?
ayidream 2004-09-19
  • 打赏
  • 举报
回复
可能是工作空间不仅调用了本目录下的文件,还调用了其它目录下的文件。

19,469

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 图形处理/算法
社区管理员
  • 图形处理/算法社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧