Eclipse黑莓预处理器不工作? [英] Eclipse Blackberry Preprocessor Not Working?

查看:237
本文介绍了Eclipse黑莓预处理器不工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经按照使用预处理指令在BlackBerry JDE插件eclipse?,确保黑莓插件预处理钩子(理论上)启用。



我在使用Eclipse 3.5.1与BlackBerry插件1.1与BB SDK 4.7.0和4.6.0。



我有我的预处理器定义集(我已经在项目的黑莓属性以及工作区黑莓构建设置中尝试过),并仔细检查了它们的大小写和拼写。



我很自信实际的代码说这个东西应该是预处理是好的,因为包含/排除预处理的代码似乎在命令行构建中正常工作:



//#preprocess ---在开始的文件



然后代码块这样整个:

  //#ifndef jde_4_7 
/ *
//#endif
/ /#ifdef jde_4_7
import net.rim.device.api.ui.TouchEvent;
//#endif
//#ifndef jde_4_7
* /
//#endif

所以我不知道还有什么可能是错误的,这将导致Eclipse不能在我的预处理代码中编译,除非我删除了应该防止触摸代码构建的注释黑莓不支持触摸的构建。



有一点它曾经工作(而且没有我没有更新Eclipse),但是在过去几个星期的某个时候,它似乎只是停止工作。而且,我在尝试测试和初步开发需要测试触摸和非触摸功能时,厌倦了搜索ifdef和手动评论/取消注释触摸代码并寻找更好的解决方案的容易出错的过程。 p>

任何其他想法可能是错误的或如何解决?

解决方案

是的,我有同样的经验。似乎他们已经用新的插件放弃了对它的支持。有时感觉就像那些家伙不能得到任何正确的。如果你想进行预处理,恐怕你必须使用Eclipse 3.4和旧的插件(1.0.67)。您可以此处,并使用所述插件获取捆绑的eclipse 3.4 - 以及您可能需要的任何其他组件包。


I've already followed the directions @ Using preprocessor directives in BlackBerry JDE plugin for eclipse? for making sure the blackberry plugin preprocessing hook is (theoretically) enabled.

I'm using Eclipse 3.5.1 with Blackberry Plugin 1.1 with BB SDKs 4.7.0 and 4.6.0.

I have my preprocessor defines set (and I've tried in both the Project's Blackberry Properties as well as the Workspace Blackberry Build settings), and checked their capitalization and spelling carefully too.

I'm fairly confident the actual code to say "this stuff should be preprocessed" is good, because including/excluding preprocessed code seems to work fine on command line builds:

//#preprocess --- at beginning of file

and then code blocks like this throughout:

//#ifndef jde_4_7
  /*
//#endif   
//#ifdef jde_4_7
import net.rim.device.api.ui.TouchEvent;
//#endif
//#ifndef jde_4_7
  */
//#endif   

So what I can't figure out what else could be wrong that would cause Eclipse to not compile in my preprocessed code unless I remove the comments that are supposed to prevent the touch code from building into a build for blackberries that don't support touch.

At one point it used to work (and no I haven't updated Eclipse), but sometime in the last couple of weeks it seemed to just stop working. And I'm getting kind of tired of the error-prone process of searching for ifdefs and manually commenting/uncommenting touch code and looking for a better solution while I do testing and initial development requiring testing both touch and non-touch functionality.

Any other ideas on what could be wrong or how to fix it?

解决方案

Yeah, I've had the same experience with this. Seems like they've dropped support for it with their new plug-in. Sometimes it feels like those guys can't get anything right. If you want preprocessing I'm afraid you'll have to use Eclipse 3.4 and the old plug-in (1.0.67). You can go here and fetch a bundled eclipse 3.4 with the said plug-in and any other component pack you may need.

这篇关于Eclipse黑莓预处理器不工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆