Jump to content
  • Advertisement
Sign in to follow this  
Dika

Wont compile :( plz help

This topic is 4819 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Well im new to programming with directX and I keep getting this error when I go to complile: error LNK2001: unresolved external symbol _D3DXCreateFontA@48 Im just trying to draw some text to the screen. I create a font object by calling: D3DXCreateFont(gD3dDevice, 20, 0, FW_BOLD, 0, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, TEXT("Arial"), &font ) I have the dx9 sdk installed as well as the june 2005 update and im using visual studio 6. Ive added d3d9.lib d3dx9.lib to project > settings> link >object Any ideas as to why this is happening?? OK im going to add one more problem im having and this has nothing to do with my previous problem (I think). im trying to draw a sprite and it compiles fine using this code: HRESULT LoadSprite() { if(SUCCEEDED(D3DXCreateSprite(gD3dDevice,&sprite))) { D3DXVECTOR3 pos; pos.x=10.0f; pos.y=20.0f; pos.z=0.0f; sprite->Begin(D3DXSPRITE_ALPHABLEND); sprite->Draw(gTexture,NULL,NULL,&pos,0xFFFFFFFF); sprite->End(); return S_OK; } return E_FAIL; } when I run the exe it crashes right away and pops up a big message saying: Debug error! Program: c:\documents\..blah blah blah Module: File: i386\chkesp.c Line: 42 The value of ESP was not properly saved across a function call. This is usually the result of calling a function declared with one calling convention with a function pointer declared with a different calling convention. Im following a tutorial and doing what was said. What am I doing wrong? Can it be due to how im loading the texture? Thank you for your help in advance. [Edited by - Dika on September 9, 2005 7:14:39 PM]

Share this post


Link to post
Share on other sites
Advertisement
Well I think does exist. I mean I have the dx9 sdk installed but the only thing is when I installed the june update for it I installed into the dir that contained the original sdk files. Im not sure if I was suppose to do that or not.

Share this post


Link to post
Share on other sites
You could try a complete rebuild. Don't know what IDE you're working with, but they generally have an option in a menu named "Build" or something similar, called "Clean". That will delete all the temporary files and force it to compile them all again.

I'm using VC++ 6, and sometimes I get the same sort of thing, when I know a file is linked to or being compiled, but it still complains. Sometimes a rebuild, like above, will fix it.

Share this post


Link to post
Share on other sites
Quote:
Original post by Endar
You could try a complete rebuild. Don't know what IDE you're working with, but they generally have an option in a menu named "Build" or something similar, called "Clean". That will delete all the temporary files and force it to compile them all again.

I'm using VC++ 6, and sometimes I get the same sort of thing, when I know a file is linked to or being compiled, but it still complains. Sometimes a rebuild, like above, will fix it.


Im using vc++ 6 as well and I just tried what you said but it didnt work :( still the same problem

Share this post


Link to post
Share on other sites
Do any directx sample/programs compile? I thought dirextx didn't support vc6 any more, the last dx9 sdk which supported it was the october 2004 release. If you get that one, you will also need to get the "extras" package (download), as well. The extras has the libs which support vc6, you will need to link with these libs.

Share this post


Link to post
Share on other sites
nope still same prob

can some one tell me if I was suppose to install the sdk updates into the folder containing the sdk install or into a seperate folder?

Share this post


Link to post
Share on other sites
Quote:
Original post by Stevieboy
Do any directx sample/programs compile? I thought dirextx didn't support vc6 any more, the last dx9 sdk which supported it was the october 2004 release. If you get that one, you will also need to get the "extras" package (download), as well. The extras has the libs which support vc6, you will need to link with these libs.


Oh damn that can be a big problem.

Share this post


Link to post
Share on other sites
If you have a broadband why not just go for visual studio 2005 beta? It can be a bit of a pain to set up & stuff to start with, but lots of people have done it so you can get help with it.

http://lab.msdn.microsoft.com/express/visualc/

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!