So...I may be trying to do something strange; Please correct me if I am.
First I present my error:
error LNK2019: unresolved external symbol _D3DXCreateTextureFromFileA@12 referenced in function"public: __thiscall Texture::Texture(char const*)"
The DIRECT X 9.0 method constructor is written as follows:
LPDIRECT3DDEVICE9 is a pointer to the IDirect3DDevice9 interface.Code:D3DXCreateTextureFromFile (LPDIRECT3DDEVICE9 pDevice, LPCSTR pSrcFile, LPDIRECT3DTEXTURE9 *ppDevice)
LPCSTR is a long pointer to a constant string.
LPDIRECT3DTEXTURE9* is a pointer to a pointer to the IDirect3DTexture9 interface.
I populated the method with the following:
Code:D3DXCreateTextureFromFile(GraphicDevice::GetService()->Device(), TEXT("Panel1.png"), &tex);
The function is contained in the constructor of my "Texture" class constructor.
Code:#ifndef _TEXTURE_H_ #define _TEXTURE_H_ #include "graphicdevice.h" #include <string> class Texture { public: Texture(LPCSTR filepath); ~Texture(void); private: LPDIRECT3DTEXTURE9 Image; }; #endif
graphicdevice.h contains the headers and class needed.
I am having quite a large amount of trouble finding the cause for this particular external error that is occuring in the texture.obj file....does anyone know what could be the cause for this problem?Code:#ifndef _GRAPHIC_DEVICE_H_ #define _GRAPHIC_DEVICE_H_ #include <windows.h> #include <windowsx.h> #include <d3d9.h> #include <d3dx9.h> #include "window.h" #include "singleton.h" #pragma comment (lib, "d3d9.lib") class GraphicDevice : public Singleton<GraphicDevice> { public: GraphicDevice(Window window); void Dispose(); void Draw(); D3DPRESENT_PARAMETERS DeviceInfo() {return _DeviceInfo;} LPDIRECT3D9 Interface() {return _Interface;} LPDIRECT3DDEVICE9 Device() {return _Device;} private: D3DPRESENT_PARAMETERS _DeviceInfo; LPDIRECT3D9 _Interface; LPDIRECT3DDEVICE9 _Device; }; #endif



LinkBack URL
About LinkBacks


