News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

#define preprocessor macro bug

Started by SasMaster, November 22, 2015, 01:49:29 PM

Previous topic - Next topic

SasMaster

Hi All.I wonder what's the problem with preprocessor definitions inside  Build Options - > #defines . I was using a version 12.x on Ubuntu and no matter what I defined there it wasn't getting activated inside the ide.I then updated to the latest version and it is still there.Is it a bug?Is anyone aware of it?

Thanks.

cacb

I use that feature on Windows and Linux and it works the way I expect it to work. Maybe you have more specific information on the problem you are seeing?

stahta01

FYI: If you are using a custom makefile project then the defines do NOT effect the makefile.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

SasMaster

Nope,I am just putting my defines into "#defines" dialog.But they are not reflected in the editor.The compiler "sees" them as the compilations proceeds according to the flags.

BlueHazzard

are you talking about editor or compilation?

They are not reflected in the code coloring in the editor, because the editor uses the code highlighting from scintilla and this component has (yet, patches are welcome) no information about the build settings.
If you are talking about compilation i would suggest that you post a full rebuild log here, so we can see what is going on...

greetings

SasMaster

I am talking about the editor.The compilation is completely all right.So you say that the editor doesn't support active macro blocks color?

BlueHazzard

I have to take back my comment. I looked into the code, and there is a working function, that collects the defines from the project file and updates the code highlighting. And it is also working for me. But i had to switch to a other target and then back to trigger the update mechanism (It gets triggered on "activate target" "activate project" and "loading workspace complete" events")

what version are you using? Have you tried a nightly build (remember 13.12 is nearly 2 years old)? If you can't try a nightly, i think in December will be the next release (see http://forums.next.codeblocks.org/index.php/topic,20730.msg141268/topicseen.html#msg141268)

greetings