Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: RubiChess on March 25, 2021, 02:13:42 pm

Title: Wrong inactive preprocessor code
Post by: RubiChess on March 25, 2021, 02:13:42 pm

I'm new Code::Blocks user and new here and this is my first question:

1. I have a C++ header file RubiChess.h which is included in the projects Header files and has some
2. I have a C++ source file learn.cpp which includes this header file in the very first line and after that checks the define
#include "RubiChess.h"

// my code

The editor greys out all the code inside the #ifdef NNUELEARN area although Settings/Editor/C++ Editor settings has "interpret #if..." and "Collect defines from project files" enabled. So I would expect the editor only grey out the code when I disable the #define NNUELEARN in the header file. This at least is how MSVC does it.

Seems that the editor doesn't look into the header file at all.
Bug? Or do I miss something?

Regards, Andreas