c++ - Using defined value in include -
i have #include
file structures following:
#include <core/mod1/file1.hpp> #include <core/mod1/file2.hpp> #include <core/mod1/mod2/.../modn/filen.hpp>
and there such includes in each file. example, in file core/mod1/file1.hpp
there might #include <core/mod3/file5.hpp>
. here core
name of library. want use core_new
instead of core
in entire project, without modifying files (actually lot). have tried add #define core core_new
, hoping kind of substitute need:
#define core core_new #include <core/mod1/file1.hpp> #include <core/mod1/file2.hpp> #include <core/mod1/mod2/.../modn/filen.hpp>
but not it: core/mod1/file1.hpp
being included instead of core_new/mod1/file1.hpp
. there way achieve it?
you want use file system, not c++ compiler. make new directory , copy/link source files on there. change -i
option in compiler to use new directory. of course, have new files in the new core
directory. way don't need edit single source/header file.
Comments
Post a Comment