Link errors?!!?!
I got this error when I tryied to debug my visual c++ program with directx
Linking...
Clipping and Scaling.obj : error LNK2001: unresolved external symbol _CLSID_DirectDraw
Clipping and Scaling.obj : error LNK2001: unresolved external symbol _IID_IDirectDraw7
Debug/test.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
What do they mean and I havent forgot any libs our headers files!
And when I try to compile a program when I using timeGetTime() then I get this error!!
Linking...
s_window.obj : error LNK2001: unresolved external symbol __imp__timeGetTime@0
Debug/s_window.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Please what do they mean??
Mullvad
Mullvad
Make sure that you have all of the Directx library.
It''s not like VB, in c++ you need a lot of .h file. I think you can get them on Microsoft.com for free.
Troa Technologies.
(real time ray tracing shadow : DK 3d engine)
It''s not like VB, in c++ you need a lot of .h file. I think you can get them on Microsoft.com for free.
Troa Technologies.
(real time ray tracing shadow : DK 3d engine)
dxguid.lib and winmm.lib should help you.
When you use a function the doc page for it says in the bottom what library you need. i.e. for timeGetTime:
They mean you are referencing something that you haven't defined. You use timeGetTime function, but you didn't actually write it, did you? winmm.lib tells the linker where to find this function.
The first two are GUIDs -- identifiers that are guaranteed to be globally unique.
[edited by - IndirectX on March 29, 2002 2:10:48 PM]
When you use a function the doc page for it says in the bottom what library you need. i.e. for timeGetTime:
quote: Library: Use Winmm.lib.
They mean you are referencing something that you haven't defined. You use timeGetTime function, but you didn't actually write it, did you? winmm.lib tells the linker where to find this function.
The first two are GUIDs -- identifiers that are guaranteed to be globally unique.
[edited by - IndirectX on March 29, 2002 2:10:48 PM]
---visit #directxdev on afternet <- not just for directx, despite the name
But the timeGetTime worked fine in Borland c++ but when I used the same code on visual c++ then the error camed up!!
And when I looked up the winmm.lib then I saw that I haved included that directory to my lib directoy!!
Why?
Mullvad
[edited by - Mullvad on March 30, 2002 5:17:46 AM]
And when I looked up the winmm.lib then I saw that I haved included that directory to my lib directoy!!
Why?
Mullvad
[edited by - Mullvad on March 30, 2002 5:17:46 AM]
Mullvad
have you left out the ddraw.lib, remember to add in the LINK too
Nothing to do, try complimenting someone, it will make you feel better!
Mullvad, link to dxguid.lib and ddraw.lib.
You can do this in project settings.
Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
You can do this in project settings.
Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
I am using visual c++ and I have went in to Tools/options and there choosen directories and there have I choosed to include the directory where the ddraw.lib and dxguid and winmm are but it still doesnt work
Why?
Mullvad
Why?
Mullvad
Mullvad
You have to actually link to the libraries, not just point to the directory where they are stored.
Don't be afraid to be yourself. Nobody else ever will be.
In MSVC++, just add these two lines of code to your code.
the #pragma comment(lib, xxx) thing just searches for the .lib file in the 2 parameter
[edited by - ph4ntasyph34r on March 31, 2002 1:19:22 AM]
#pragma comment(lib,"winmm.lib")#pragma comment(lib,"dxguid.lib")
the #pragma comment(lib, xxx) thing just searches for the .lib file in the 2 parameter
[edited by - ph4ntasyph34r on March 31, 2002 1:19:22 AM]
/* This is a comment *//* Abuse it */
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement