A (stupid) direct x problem... Please Help!!
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
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
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
"Innocent is just a nice way to say ignorant, and stupidity is ignorance with its clothes off."words of,skitzo_smurf
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
========
Smidge
--Mr Smidge
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).
#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).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement