问题
There is a project that has #preprocess directives. I.e. there is #preprocess directive in the beginning of a file and something like #ifdef BlackBerrySDK6.0.0 inside the file.
Though it compiles well in eclipse, there are problems using bb-ant-tools. It behaves as though there is no preprocessing: compile errors on strings that should not be included.
I have build.properties file; it is included through <property file="build.properties"> AND <jdp file="build.properties">. I have BlackBerrySDK5.0.0=true in it.
回答1:
Realized it myself. I should claim defines="blabla" in properties of task: <rapc output="foo" destdir="bar" defines="blabla">
来源:https://stackoverflow.com/questions/8365900/preprocessor-in-blackberry-through-bb-ant-tools