Jump to content
  • Advertisement
Sign in to follow this  
pghTech

Problem with Program not including Direct X libraries/headers

This topic is 4439 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 going through a book tutorial, and I have copied the code, line for line, and setup the directory structure with the same files exactly the same as the book's source code/directories. Using the same IDE (VC++ 2005), when I load up the book's source code project and compile, it compiles without issue. However, when I load up my project and compile it is not including the objbase.h in library ole32.lib and therefore doesn't recognize functions such as: CoInitializeEx UnIntializeEx I checked the Books source code project settings, and both the books and my project Include and library directory setup is exactly the same with it including the ...\Microsoft DirectX 9.0 SDK for both the (Lib and Include Dir's). The only difference I see is in the books project setting: "Preprocessor Definitions" it is including _WIN32_DCOM and mine isn't. If this is the problem then I have two questions: The first question would be - I am not sure what I would need to do to get that included as I am not that familiar with setting up "Preprocessor Definitions". The second question is if this is standard? do you have to set the preprocessor definitions? Or is there some way else through the VC project that it should have, or I should have set to use _WIN32_DCOM?

Share this post


Link to post
Share on other sites
Advertisement
ole32.lib is not specific to DirectX, it's a Windows library. If you go to the project settings, under configuration properties, Linker, Input there's a field called Additional Dependencies. Add it there, if it's not there.

Are you using VC Express? IIRC, it didn't come with the Platform SDK, which you may have to download and install separately to get those libs and headers.

Share this post


Link to post
Share on other sites
Thanks Kanato

I am using VC++ 2005 standard (not the express).

I found doing some hunting, that I had to add the

#define _WIN32_DCOM

directive to the program for it to included it. According to some literature, the near version of Direct X requires it.

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.

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!