Archived

This topic is now archived and is closed to further replies.

MrKillemAll

C++ novis i need!

Recommended Posts

I''ve ust converted to th wonderful world of DX for c++ from being a hardcore VB programmer... I''ve realized that C++ is not only the world of wonders but also the world of enturnal errors... Now to the question, why do I get this message when trying to complie this code? The message: ATH_Device.obj : error LNK2001: unresolved external symbol _D3DXCreateTextureFromFileA@12 Athena___Win32_Debug/Athena.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. The Code: if( FAILED( D3DXCreateTextureFromFile( a_D3DDevice, "banana.bmp", &a_Texture ) ) ) return E_FAIL; please help me! ToxicSoul/ Lead [almoast] everything at ankasoft www.ankasoft.com

Share this post


Link to post
Share on other sites
Sounds like you haven't included the appropriate library in your project settings. It may also mean that you have the wrong number of parameters or anything along those lines, but since you don't seem to have gotten a compiler error, I'm not sure.

Edited by - MagicScript on August 13, 2001 11:35:07 AM

Share this post


Link to post
Share on other sites
I use:

#include
#include

as include files that should work right, and the parameters also seam okey...

Mabye I should add that I got the error then I added the & sign to correct athoner error, but that should work cuse thats how the do in the MS sample.

This beats me =

Edited by - MrKillemAll on August 13, 2001 11:46:26 AM

Edited by - MrKillemAll on August 13, 2001 11:48:15 AM

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
hm they disaperd i try agin

d3dx8.h
mmsystem.h

Share this post


Link to post
Share on other sites
you haven''t included the relevant library (library != header)

The CreateTextureFromFile is in d3dx.lib I think, go to project->settings->link and add d3dx.lib to the list of included libraries....

Share this post


Link to post
Share on other sites
I''ve included the file and lib but i still get the message...

But thanks anyway, I had forgoten all about the libs and would probably had to deal with that later =

Share this post


Link to post
Share on other sites
Hallo,

I''m not to shure about that, couse i am also new to
programming directX -
but i think you have to link
d3d8x.lib
to your projekt and
include d3d8x.h
couse they are nedded to perform

D3DXCreateTextureFromFileA

hope this helps, if not i''m sorry for sending you on the wrong way



Share this post


Link to post
Share on other sites