C++ Direct 错误

来源:百度知道 编辑:UC知道 时间:2024/06/05 01:54:50
昨天晚上刚学C++ Direct 按着书上写的 导入d3d9.lib d3dof.lib dxguid.lib
d3dx9d.lib winmm.lib 也添加了库文件x86 x64和包含文件include
还是出现错误

------ Build started: Project: DxProject01, Configuration: Release Win32 ------
Compiling...
DxProject01.cpp
Linking...
DxProject01.obj : error LNK2001: unresolved external symbol "extern "C" struct IDirect3D9 * __stdcall Direct3DCreate9(unsigned int)" (?Direct3DCreate9@@$$J14YGPAUIDirect3D9@@I@Z)
MSVCRT.lib(crtexe.obj) : error LNK2001: unresolved external symbol _main
D:\My Documents\Visual Studio 2008\Projects\DxProject01\Release\DxProject01.exe : fatal error LNK1120: 2 unresolved externals
Build log was saved at "file://d:\My Documents\Visual Studio 2008\Projects\DxProject01\DxProject01\Release\BuildLog.htm"
DxProject01 - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

你别老是用一些书本提供的代码啊,那些代码当你没有dx经验的时候是很难调整好的.毛病百出.
怎么不下载微软官方出的 dx9 sdk呀,虽然有点大,500M以上
但是里面有非常详尽的例子和文档,初学者还是看官方的吧..