News:

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

Main Menu

How i can tell CB that a define name is true or false?

Started by dkaip, September 22, 2018, 07:24:19 PM

Previous topic - Next topic

dkaip

Hello.
I am trying to find how to set a define name true or false.
Making same libs we put for example ...

is_debug = false
is_component_build = false

If i try to put all sources in C:B how i must put that defines in Build>#defines session?

Thank you.
Jim


BlueHazzard

I do not understand your question fully... If the following answer does not solve your problem try to rephrase it, or give a example command line for gcc, or add screenshots..

If you want to add defines to the compiler settings you can add them to
Project->Build options->Select the project name on the left->Compiler->#defines->add

i do not think the preprocessor understands "true" and "false".. i would use "1" and "0"

dkaip

For example if i must run a cpp file with pdfium lib, pdfium lib made with ninja and some setting in settings file args.gn like...

is_debug = false
pdf_is_standalone = true


How i can put in #define tab if i have all library sources in my project?
Suppose i put like ...
is_debug = 0
pdf_is_standalone = 1


In source file we put all that as...


#define is_debug false
#define pdf_is_standalone true


Thank you
Jim

BlueHazzard

Quote from: dkaip on September 22, 2018, 10:49:29 PM
How i can put in #define tab if i have all library sources in my project?
Suppose i put like ...
is_debug = 0
pdf_is_standalone = 1

well i assume yes. But if "true" and "false" works in your old build, then it will also work in codeblocks