Jump to content
  • Advertisement

Archived

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

Nullio

Link Order

This topic is 6060 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

Here''s the problem, I have _ files: EngineMain.cpp //Main window set up Globals.hpp //Hold all my structs, global vars, etc ddraw.h //DirectDraw header CGameEngine.hpp/cpp //Game Engine object now if I''m correct here EngineMain.cpp holds WinMain() so it will be compiled first, so EngineMain.cpp #includes''s ddraw.h, globals.h, CGameEngine.hpp in that order. But I seem to be getting compile errors from CGameEngine.hpp uses some ddraw.h variables and for some reason ddraw.h isn''t included before CGameEngine.hpp. in what order does Micro$ofts Visual C++ compile and link things in and how to I structure my project to better suite this?? (PLEZ GIVE EXAMPLES!)

Share this post


Link to post
Share on other sites
Advertisement
Each cpp file compiles to an .obj file, so whatever u use inside the cpp, it must be visible.

Make every header file compilable on its own. Include all the stuff that your header uses. Add your header(global.hpp, CGameEngine.hpp) individually to an empty cpp file to test if it can compile on its own.

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!