What assembly should be considered when using a preprocessor

I have a project that needs to be used in blackberry versions 4.6 and 5.0. I have the same code in versions 4.6 and 5.0 with some preprocessor directives attached to the code (#ifndef instructions that I need to use for 5.0 since facebook sdk is not supported in version 4.6) I have 2 .cod files (one for 4.6 and others for 5.0) they work as needed in their simulators.

But, when I upload the .cod 4.6 file to 5.0 ... (it treats it as code inside the preprocessor as a comment) and when I do it the other way around

those. from 5.0 to 4.6 ... he says ... project_name-1.code not found.

A similar question was also posted here to check where a comment on bbtool says it is possible. One build for two different versions (4.6.4.7 and 5.0 + above) in blackberry

0
source share
1 answer

Using a preprocessor is not a way to do A SINGLE BUILDdifferent versions of BB OS (no matter what tool you use to prepare the assembly).

/ / . , - . . / ... . /.cod/... ...

T H E S E ; C-, .

, :

// START OF CODE
//#preprocess
// this is the second line of the code
//...
//#ifdef OS_5
import net.rim.device.api.ui.component.AutoCompleteField;
//#else
//don't import AutoCompleteField and import something else if needed
//#endif

//...
//... // some more codes
//...

//#ifdef OS_5
//...
//...
// Codes for using AutoCompleteField
//...
//...
//#else
//...
//...
// Codes for implementing AutoCompleteField another way by yourself
//...
//...

//...
//... // some more codes
//...
 // END OF CODE

, (JDE, Eclipse Ant), 'OS_5', ( ), :

// START OF CODE
// this is the second line of the code
//...
import net.rim.device.api.ui.component.AutoCompleteField;

//...
//... // some more codes
//...

//...
//...
// Codes for using AutoCompleteField
//...
//...

//...
//... // some more codes
//...
 // END OF CODE

.cod . .cod BB OS 5,0, AutoCompleteField OS 5.

'OS_5' :

// START OF CODE
// this is the second line of the code
//...
//don't import AutoCompleteField and import something else if needed

//...
//... // some more codes
//...


//...
//...
// Codes for implementing AutoCompleteField another way by yourself
//...
//...

//...
//... // some more codes
//...
 // END OF CODE

.cod , .cod, .

, A SINGLE BUILD BB OS, remove dependencies , API-, (4.6, 5.0... , ). , , , .

--- , , .


, , .

+2

All Articles