I have a small C project involving several C source files. Code::Blocks can't compile it, due to unresolved function names. However when compiling and linking the same sources under the shell, it compiles and links ok.
How can I trace down this nasty error. I know the sources are ok and compile/link successfully, but why not under Code::Blocks.
NB. I developed the sources under Code::Blocks, and initially, this error did not happen. Only after some changes were made (refactoring functions, renaming and/or replacing them, etc.) this suddenly happened.
Some details:
The error reported that some function calls in Source A to functions declared in Source B do not get resolved.
However a couple of functions called from A and declared in B seem to be fine, and are not reported as unresolved.
I checked for misspellings and proper declarations (declared in A with full function prototypes as external, and declared and defined in B, including function prototypes as global function).
For example:
Source A:
//////////////////////////
extern void my_func_1(void);
......
int do_something(void)
{
my_func_1();
}
////////////////////////
Source B:
//////////////////////////////
void my_func_1(void);
....
void my_func_1(void)
{
/// function body/definition
}
//////////////////////
I checked for all functions called from A and defined in B that this syntax is used, but some of those functions can not be resolved, and others do.