Jump to content
  • Advertisement
Sign in to follow this  
Dani77

DX9 problem

This topic is 5143 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 have DX9 SDK installed and when trying to run a visual c++ application using dx8 libraries I got the following error: Linking... ScreenCapture.obj : error LNK2001: unresolved external symbol _Direct3DCreate8@4 Debug/ScreenCapture.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. ScreenCapture.exe - 2 error(s), 0 warning(s) The path to the Include and Lib folders are ok in settings (Tools->Options->Directories) but the error still persists. I suppose that it's related to the installed version of DX (9 instead of 8), does anybody had this problem before or know a solution? Tkans a lot

Share this post


Link to post
Share on other sites
Advertisement
Yeah. It's not just enough that you have the folder with the libs set properly. In project settings, you have to go to the appropriate property page (Linker/Input), and add the lib "d3d8.lib" (without the quotes) to Additional Dependancies.

Share this post


Link to post
Share on other sites
Thanks a lot, it's working like this.

A second question, if it's not too much (I'm rather a beginner in what concerns d3d):
the goal is to make an application that captures the screen at a given time interval.
I saw that there are various methods for capturing the screen, so I have chosen d3d: D3DXSaveSurfaceToFile.

One thing is to know if in dx8 is it possible to save in jpg format (not bmp, as it the file is too lage) and secondly I noticed that a screen capture for a video file running in Media player is not made correctly (just a black sqare).
I need to make a full capture of the screen, no matter what is on the screen.

Did I made the wrong choice of the method?...

Share this post


Link to post
Share on other sites
D3DXSaveSurfaceToFile() lets you save a JPEG image (Well, the DX9 version does, I don't have the docs for the DX8 version). You just need to set the DestFormat parameter to D3DXIFF_JPG.

You can't capture Windows Media Player windows like that, because WMP uses a DirectDraw overlay to draw the video onto (which is why you get the video moving at a different speed to the window if you try to drag the window around the screen). I'm not sure how to read whats on the screen in this case.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Seems that a frame grabber or a capture with VMR would solve the problem.

Any idea about exemples or howto use them (I'm really a newcommer in the domain...)

Thanks again,

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!