Code::Blocks Forums
Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: shenc on February 03, 2017, 10:00:13 pm
-
I need to pass a version string from makefile so I define it as -DVERSION='"1.1.1.0"' in "Other compiler option" or in "#defines" field as VERSION='"1.1.1.0"'. It breaks CB, CB does not compile. If I remove this string CB compiles. So I am sure it is this string breaks CB.
I also tried
-DVERSION='\"1.1.1.0\"'
-DVERSION=\'"1.1.1.0"\'
only
-DVERSION=\'"1.1.1.0"\'
works.
-
What do you mean by breaks?
-
CB does not compile. BTW, when I copy the project to other location. CB changes \'"1.1.1.0"\' to /'"1.1.1.0"/' by itself. I need change it back to \'"1.1.1.0"\' to compile. The behavior is verified. I think it is a bug.
-
My magic ball is broken. Please describe the problem in better detail!
-
The question is most likely how to properly quote #defines in the compiler settings to define a value for a #define that wouldnt work in a plain way e.g. if it contains spaces. Various forms of different quoting either break the assembly of the compile command so that strange errors happen or CodeBlocks habits to switch path separators around break the quoting.