Jump to content
  • Advertisement

Archived

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

X86

A (stupid) direct x problem... Please Help!!

This topic is 6534 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 am trying to start playing with direct x and eventually make a game, but I am haveing problems. When I try to compile simple sample apps that I download or the ones that come with the direct x sdk I get the following errors: ddex2.obj : error LNK2001: unresolved external symbol _DirectDrawCreateEx@16 ddex2.obj : error LNK2001: unresolved external symbol _IID_IDirectDraw7 Debug/ddex1.exe : fatal error LNK1120: 2 unresolved externals I am useing Visual C++ 6.0 Standard Edition. Can someone please help me? Thanks.. Edited by - X86 on 7/25/00 12:15:47 AM

Share this post


Link to post
Share on other sites
Advertisement
you have to include the lib''s in your project and set the path to tell the compiler where to look for the include files.

1) go to project-->setting. Click on the link tab. Add ddraw.lib and dxguid.lib to the text field.

2)go to tools-->options. Click on the directories tab. There will be a drop down text field. Set it to "include files". Make a new path pointing to your directX include files. Example, mine are c:\mssdk\bin. Now click the black arrow until that new path is at the very top. Next do the same for the library files, adding the path to your libs. Again mine are at c:\mssdk\lib.

Skitzo_smurf

Share this post


Link to post
Share on other sites
Just remember that in general, almost all unresolved external errors, which are usually hard to track down, are caused by references to variables/functions OUTSIDE of the current source file. Therefore, this applies to ''extern'' vars as well as library functions...

========
Smidge

Share this post


Link to post
Share on other sites
I would like to take this opportunity to remind everybody that there is something EXTREMELY important you need to #define when you use DirectX. In the code BEFORE you #include the directX libraries, you MUST put:

#define INITGUID

If I spelled it wrong, you can look it up for yourself in ddraw.h. It''s near the top somewhere where they define the GUID''s for the DirectX COM objects.

If this is no longer necessary could somebody please let me know. With my current version of VC++ and DirectX, it is still necessary (DX 7.0a).

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!