User forums > Using Code::Blocks
#include MACRO, C::B can't detect dependency
pozzugno:
I have a source file similar to this:
#include "opt.h"
#include INCLUDE_FILENAME
In #include <opt.h> there's something similar to:
#include "user_opt.h"
#ifndef INCLUDE_FILENAME
# define INCLUDE_FILENAME "include.h"
#endif
It seems C::B isn't able to detect that .c file depends on include.h too. If I change something in "include.h" only, the build process doesn't anything.
ollydbg:
You are correct, that is a limitation in our compiler plugin. You can have a look at the Code::Blocks' source code to understand how the dependency is calculated. It is in the folder src\plugins\compilergcc\depslib. Can you find a better way to do it?
pozzugno:
Why not add a setting with a command that creates a .depend file that C::B will look during building?
I think many compilers have an option to create a dependecy file that is completely correct.
stahta01:
I am guessing external dependency in code::blocks would not do what you want; but, did you try it to be sure?
Edit: I just recalled external dependency is a linker dependency; and, you likely need an compiler dependency.
Tim S.
stahta01:
--- Quote from: ollydbg on February 27, 2018, 03:47:17 pm ---You are correct, that is a limitation in our compiler plugin. You can have a look at the Code::Blocks' source code to understand how the dependency is calculated. It is in the folder src\plugins\compilergcc\depslib. Can you find a better way to do it?
--- End quote ---
So for, I have found "plugins\compilergcc\directcommands.cpp" tends to be the file that calls the depslib functions.
Tim S.
Navigation
[0] Message Index
[#] Next page
Go to full version