Jump to content
  • Advertisement

Archived

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

santi_productions

How do I get DXsdk 8.1 to work with C++?

This topic is 5790 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

I''ve installed DirectX SDK 8.1 on my harddrive but how do I get it to work with Visual C++ 5.0? I added include and lib directories within the options of DevStudio but I get some very weird problems trying to compile a program that game with a book I bought... "Tricks of the Windows Game Programming GURUS Second Edition" - Published by Sams. Errors: Compiling... WinMain.cpp C:\Program Files\DevStudio\MyProjects\Astroids\WinMain.cpp(134) : warning C4101: ''buffer'' : unreferenced local variable C:\Program Files\DevStudio\MyProjects\Astroids\WinMain.cpp(286) : warning C4101: ''hdc'' : unreferenced local variable Linking... WinMain.obj : error LNK2001: unresolved external symbol _DirectDrawCreateEx@16 Debug/Astroids.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. Did I install DirectX SDK 8.1 wrong? John DiSanti of Santi Productions.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
I believe directX 8.0 requires visual C++ 6.0

Share this post


Link to post
Share on other sites
It''s not enough to add the path to the include and lib ... you have to add this :

Menu Project/Settings
Tab Link
-> object/library modules

add this library : ddraw.lib

or else easier write this line in your main cpp file :

#pragma comment(lib,"ddraw.lib")


__________________________



Bruno Wieckowski
Lead Programmer
Exood4 Studios

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by Mulligan
put:
#pragma comment(lib, "ddraw.lib"
at the top of the program


Pragmaing in a lib file is just horrible coding practice. Learn how to use your compiler eesh!

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
Learn how to use your compiler eesh!



In this case you mean the linker.



D.V.

Carpe Diem

[edited by - DeltaVee on August 15, 2002 2:57:25 PM]

Share this post


Link to post
Share on other sites
I have tried putting the ddraw.lib in the linkers settings but now I have 1 new error and the other errors are gone ! But this error says:

Compiling...
WinMain.cpp
C:\Program Files\DevStudio\MyProjects\Astroids\WinMain.cpp(135) : warning C4101: ''buffer'' : unreferenced local variable
C:\Program Files\DevStudio\MyProjects\Astroids\WinMain.cpp(287) : warning C4101: ''hdc'' : unreferenced local variable
Linking...
C:\DXSDK\LIB\ddraw.lib : fatal error LNK1106: invalid file or disk full: cannot seek to 0x3b160894
Error executing link.exe.

I have 32 Gigabytes of harddrive space and the file does exist. I even made sure of it. Is there a possible way of fixing this?


John DiSanti of Santi Productions.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Have you tried putting the include/lib paths at the top of the directory list. By Default VC looks for the includes & libs from the top down, so it could be referencing an older version of DX that shipped with VC++5.

Cheers
Dazzer

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!