problem with direct x
hello all,
i am a new c++ programer i want to begin programming games with direct x,first and almost i heard a lot about this librairie but i still dont use it.
i have visual studio 6 installed(with a full setup),it works fine, but when i try to compile some examples on the net i have somes problems.
i tried to compile code in ddraw tutorial (http://www.gamedev.net/reference/articles/article608.asp) i have a problem in line
ddrval = DirectDrawCreate( NULL, &lpDD, NULL );
it seems that the compiler doesnt recognize DirectDrawCreate function
what is wrong?!
do i have to upgrade this version of direct X?!
thank s a lot in advance.
Hello All
yes, i have the error"unresolved external symbol"
but the link point a search page i couldnt see what do you wan to tell me
thanx a lot for the help!
but the link point a search page i couldnt see what do you wan to tell me
thanx a lot for the help!
I think what InDirectX is trying to say is that if the error is "unresolved external symbol" then it''s such a common problem with beginners to DirectX that you should have searched the forums before asking the question, as it''s been dealt with many times before.
-Mezz
-Mezz
The first step would be downloading and installing the directx sdk. (www.microsoft.com/directx)
xyzzy
xyzzy
Just so that everybody that doesn''t know - the DirectX 5 SDK comes with VC/C++ 6, so the above call should work as long as the appopriate headers are included and libraries linked.
simo, are you including "ddraw.h" in your project? It should be at the top of the file using the DirectDrawCreate function call.
Jim Adams
home.att.net/~rpgbook
Author, Programming Role-Playing Games with DirectX
simo, are you including "ddraw.h" in your project? It should be at the top of the file using the DirectDrawCreate function call.
Jim Adams
home.att.net/~rpgbook
Author, Programming Role-Playing Games with DirectX
Well, he did say it was an unresolved external, which is generally not indicative of a missing header...
Later,
ZE.
//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links
Later,
ZE.
//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links
Link you DirectX library to the program. If your using DirectX 8.1 add:
#pragma comment(lib, "d3d8.lib")
#pragma comment(lib, "d3dx8.lib")
That should do it.
EDIT.
I didnt read it fully. Don't add the above, add:
#pragma comment(lib, "ddraw.lib")
[edited by - JnZ on June 6, 2002 4:29:04 PM]
#pragma comment(lib, "d3d8.lib")
#pragma comment(lib, "d3dx8.lib")
That should do it.
EDIT.
I didnt read it fully. Don't add the above, add:
#pragma comment(lib, "ddraw.lib")
[edited by - JnZ on June 6, 2002 4:29:04 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement