Jump to content
  • Advertisement
Sign in to follow this  
barodapride

a simple directx question

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

So I'm quite new to this, I'm following a tutorial I got from experiments in game programming about how to make breakout. Anyway the very first thing it shows how to do is make a blank window. I copied all the code, downloaded directx 9 sdk and it doesnt build because "cannot open the file "d3d9.lib". I just went throught the installation that directx 9 did automaticall so I guess I just dont know how to tie the library into the code. Anyone out there know?

Share this post


Link to post
Share on other sites
Advertisement
what environment are you developing in? In .net you can do it a number of ways. you can either do a

#pragma comment (lib, "the library you need goes here")

or in your project settings go to Linker->input->additional dependencies and put the libraries you need in that line.

Share this post


Link to post
Share on other sites
It depends on what IDE you are using. If you are using Visual Studio, try adding this line to the top of your main.cpp:-

#pragma using( lib, "path/to/d3d9.lib" )

If you are using Dev-C++, then add this line to the project options:-

-lpath/to/d3d9.a

NOTE: The above line is .a even though d3d9.dll is a .dll. Just type the path to d3d9.dll straight after the -l with no spaces.

Share this post


Link to post
Share on other sites
#pragma comment(lib,"d3d9.lib")

that's the line in my code, I am using visual studio c++ 6.0

I dont know where the library is located since it installed itself automatically - I guess I am just a true newbie to get stuck on something like this. Thanks for the help.

Share this post


Link to post
Share on other sites
OK I found out the location of the library is here:

C:\Program Files\Microsoft DirectX 9.0 SDK (October 2005)\Lib\x64

when I paste this into the " " its giving me some weird errors like invalid machine type, I changed the \ to a / since someone who responded showed doing it like that but it still doesnt work. Is it because of the spaces? What is wrong? I added the /d3d9.lib on the end of the path. Help appreciated!

Share this post


Link to post
Share on other sites
Quote:
Original post by barodapride
OK I found out the location of the library is here:

C:\Program Files\Microsoft DirectX 9.0 SDK (October 2005)\Lib\x64

when I paste this into the " " its giving me some weird errors like invalid machine type, I changed the \ to a / since someone who responded showed doing it like that but it still doesnt work. Is it because of the spaces? What is wrong? I added the /d3d9.lib on the end of the path. Help appreciated!



The "x64" folder contains libraries for 64-bit Windows. Thus you need a 64-bit compiler, processor and of course a copy of 64-bit Windows to run the compiled program. So use the libraries in the "x86" folder instead.

Also, you can set up build paths in VC++ 6 by going into the Tools/Options menu and add include and library paths under the "Directories" tab. VC++ will look for files in the order they are listed on the list.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I think the DX9 SDK doe snot support VC++ 6 anymore.

Share this post


Link to post
Share on other sites
Quote:
Original post by barodapride
Ok it works with the x86 folder. What is x86 anyway? Thanks a ton for the help!


I'm pretty sure that x86 represents a 32-bit machine, and x64 represnets a 64-bit machine. Don't ask me why, it just does [grin]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
iam just a beginer at maya 7 ple i just downlaod it and i have this book for it i need help because in the book it tells me to go to creat poloygon tool then make the figure showen then extrude egdes and then it tells me to go to modify>convert>poloygon to subdiv i do all of this and when i go to click on poloygon to subdiv a waring thing shows up and says that it only works on polygon sufaces so if i could get some help that would be great thx.

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!