Jump to content
Sign in to follow this  
sussmori

Using #include "blah.hpp"

Recommended Posts

Does anyone know how to use the compiler directive #include in an addon pbo?

I'm trying to use it like this:

#include "\<pbo name>\CfgMovesI44.hpp" in config.cpp

with the files "cfgmovesI44.hpp" in my addon directory to prevent my config file from becoming unmanagable.

Any ideas? I've seen BIS uses the #include in their config files like this:

#include "cfgModels.hpp"

#include "cfgMoves.hpp"

#include "cfgWeapons.hpp"

#include "cfgVehicles.hpp"

but i can't get it to work. I get an error about preprocessor error

Share this post


Link to post
Share on other sites

If you remove the backslash (\) in front of your add-on name it should work. So in your case it would be:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#include "<pbo name>\CfgMovesI44.hpp"

Share this post


Link to post
Share on other sites

That works. Thanks

Excellent way to organized cpps for a mod

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×