News:

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

Main Menu

How to include "config.h" defines?

Started by visir, January 15, 2018, 09:42:56 AM

Previous topic - Next topic

visir

Hello. I have a "config.h" file, generated by a "configure" script. I want codeblocks to highlight the code according to #defines in it.

I don't use codeblocks to actually build anything, I use it for the debugger. I have set it to "this is a custom makefile", and makefile is set to "NOTHING", so that I don't accidentally break anything by pressing "compile". The side effect of it is that I can't set my custom #defines anymore.

The program I'm studying right now is ffmpeg.

BlueHazzard

the define highlighting in codeblocks is really rudimentary, and i think it only works as a per file basis (but i am not sure about this)

visir

What is the format of codeblocks #defines?

#define CONFIG_AVDEVICE 1

#define CONFIG_AVDEVICE=1

#define CONFIG_AVDEVICE="1"

CONFIG_AVDEVICE=1


stahta01

Quote from: visir on January 20, 2018, 10:42:22 AM
What is the format of codeblocks #defines?

#define CONFIG_AVDEVICE 1

#define CONFIG_AVDEVICE=1

#define CONFIG_AVDEVICE="1"

CONFIG_AVDEVICE=1

Edit: Inside the CB GUI it is "CONFIG_AVDEVICE=1" without the double quotes.

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]

visir

#define seems to have worked too. Really glad for that, I just copypasted everything as is.