C++ novis i need!

Started by
6 comments, last by MrKillemAll 22 years, 8 months ago
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
//****************************// www.ankasoft.com *//****************************
Advertisement
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
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
//****************************// www.ankasoft.com *//****************************
hm they disaperd i try agin

d3dx8.h
mmsystem.h
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....
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 =
//****************************// www.ankasoft.com *//****************************
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



Thank you Gumbo... it solved my problem =
//****************************// www.ankasoft.com *//****************************

This topic is closed to new replies.

Advertisement