Jump to content
  • Advertisement

Archived

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

monkeyography

stupid #include problem

This topic is 5683 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''m sure there''s a spiffy 1.2.3. solution to this but when I try to #include "d3dfont.h", as is done in Microsoft''s Text3D demo, I get this error: fatal error C1083: Cannot open include file: ''d3dfont.h'': No such file or directory which makes sense since d3dfont.h is in: D3DINSTALL\samples\Multimedia\Common\include and not my project directory. I know the solution has something to do with my project settings (msvc++), but I''m not so knowledgable in the project-settings-area. Without hard-coding the filepath into my #include statement, what do I have to do to get this working?

Share this post


Link to post
Share on other sites
Advertisement
There is usually something in project settings that has a list of where to look for header files. In your case you should add that path to the list of dirs to search. I am unsure where it would be in MSVC but it should be there somewhere.



---------
Andrew

Share this post


Link to post
Share on other sites
Go to Tools/Options... and click the Directories tab. Select "Include files" in the "Show Directories for" drop-down. Click the "New" icon (the little square thing) and enter the full directory path.

Share this post


Link to post
Share on other sites
Sure, there is a additional include path setting under:

Project->settings

then go to the C/C++ tab and under category go to preprocessor.
You should see a Additional include directorys field, just type the path to the include files. if you need more than one additional include path,you can type them all into the field seperated by commas.

Later,
Ben

Share this post


Link to post
Share on other sites
stickben''s method is probably better than mine. His only affects the current project. Mine would have all projects searching the added directories.

Share this post


Link to post
Share on other sites
Whenever you include headers that are in the default system include directory, you should use < > instead of " ". If you use " " it'll look in the project include path first. Try #include <d3dfont.h>


edit....

err, i just noticed that you wasn't placing them in the default include path..... so, you can take the above with a grain of salt.

[edited by - Hairu on January 23, 2003 12:15:50 AM]

Share this post


Link to post
Share on other sites
I would place D3DINSTALL\samples\Multimedia\Common\include in your Tools->Options->Directories->Include Files list since you are likely to use includes from there for most or all of your DirectX programs.

Don''t forget to also place D3DINSTALL\LIB in your Tools->Options->Directories->Library Files list. :o)

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.

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!