【发布时间】:2014-04-22 12:27:54
【问题描述】:
我的class.cpp这个函数有这个问题
D3DXCreateTextureFromFileEx(
myDevice,
myFile.c_str(),
myWidth,
myHeight,
D3DX_DEFAULT,
0,
D3DFMT_UNKNOWN,
D3DPOOL_MANAGED,
D3DX_DEFAULT,
D3DX_DEFAULT,
0,
NULL,
NULL,
&myTexture);
当我编译项目时 Visual Studio 给我这个错误:
1>test.obj : 错误 LNK2019: symbole externe non résolu _D3DXCreateTextureFromFileExA@56 参考 dans la fonction "public: int __thiscall Sprite::mySprite(struct IDirect3DDevice9 *,class std::basic_string,类 std::allocator >,int,int)" (?mySprite@Sprite@@QAEHPAUIDirect3DDevice9@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@HH@Z) 1>C:\Users\mypc\Documents\Visual Studio 2012\Projects\myfirstsprite\Debug\mysprite.exe:致命错误 LNK1120: 1 externes non resolus
为什么?
【问题讨论】:
-
我 read the fine manual 它说你需要链接
D3dx9.lib
标签: c++ visual-studio-2012 directx-9