Monday, May 24, 2010

Any experts on c++? please help?

I keep getting the following errors: error LNK2001: unresolved external symbol "struct IDirect3DTexture9 * * spriteArray" (?spriteArray@@3PAPAUIDirect3DTexture9@@...





error LNK2019: unresolved external symbol "struct IDirect3DTexture9 * * spriteArray" (?spriteArray@@3PAPAUIDirect3DTexture9@@... referenced in function "bool __cdecl Game_Init(struct HWND__ *)" (?Game_Init@@YA_NPAUHWND__@@@Z)





error LNK2001: unresolved external symbol "struct ID3DXSprite * Sprite_Handler" (?Sprite_Handler@@3PAUID3DXSprite@@A)





what am i doing wrong? do i need additional libraries?





please help!

Any experts on c++? please help?
Unresolved externals mean that you're calling a function that isn't defined in your code anywhere, and the linker also can't find it in any of the libraries you've specified.





Looks like those are DirectX symbols, so I'd guess you need to add the DirectX libraries to your project. I'm not at my Windows machine to check, but there's presumably a .lib for DirectX somewhere on your system to link against.





Check out the DX examples on msdn.com if it's not obvious what to do.
Reply:It would help if you orginized the code, and the problem could possibly lie within your compiler, not your code. By the way it would help if you posted the code on a ftp server and posted the address.
Reply:You are missing some libraries (one or more) You must have included a proper .h file or you would have compile time errors, so find the h file that has those api's and structures defined and see if they can give you a hint as to the library(dll or lib) that your missing and then include that in the project settings.
Reply:Check out this discussion of how to link to DirectX 9: It talks about the libraries and include paths.





http://www.gamedev.net/community/forums/...


No comments:

Post a Comment