Jump to content
  • Advertisement
Sign in to follow this  
Patience

You would think after years of programming....

This topic is 5457 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 have recently gotten back into DX programming, and was brought to a halt for about 10 mins by an unresolved external symbol linker error telling me basically that nothing with DX9 was linking. At the top of my Main.cpp (the file having linking errors) I have this ... #include <d3d9.h> #include <d3dx9.h> ... supposedly the headers for the libraries that I need in order to resolve the external symbol errors.... I have my project properties in VS.Net set up so it includes the C:\DXSDK\Include directory, and the linker set up to use C:\DXSDK\Lib for additional libraries however it didn't fix the problem... So I added the two library files to the command line in the linker and now it works fine. Any suggestions as to why it wouldn't figure that out by itself, especially since under the command line argurments it looks like this: /OUT:"Debug/AnotherTry.exe" /INCREMENTAL /NOLOGO /LIBPATH:"C:\DXSDK\Lib" /DEBUG /PDB:"Debug/AnotherTry.pdb" /SUBSYSTEM:WINDOWS /MACHINE:IX86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Thanks for the insight. "All we need is just a little patience"

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Patience
supposedly the headers for the libraries that I need in order to resolve the external symbol errors....

..

however it didn't fix the problem... So I added the two library files to the command line in the linker and now it works fine.
You need to include the headers in your source files for all of the structure and interface definitions. However, this does *not* tell the compiler which libraries to link. You need to tell it this explicitly. To do this, go to:

- Project Properties
- Expand 'Configurational Properties' folder
- Expand 'Linker' folder
- Select 'Input' subitem
- Add your libraries to the 'Additional Dependencies' text box. This is where you should enter d3d9.lib d3dx9.lib, or whatever libs you are using.

This way, you don't need to manually edit the command line arguments.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!