Eclipse从项目属性中缺少C / C ++构建和常规 [英] Eclipse missing C/C++ build and general from project properties

查看:585
本文介绍了Eclipse从项目属性中缺少C / C ++构建和常规的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有eclipse运行,并试图获得opencv4android( http ://docs.opencv.org/doc/tutorials/introduction/android_binary_package/O4A_SDK.html



说明要去项目 - >属性和他们将是一个C / C ++构建来改变ndk-build的位置。但是,我没有看到C / C ++编译或一般。



当我开始eclipse并转到:



Android开发工具



Build:v22.0.1-685705



本产品包括Eclipse Platform,JDT, CDT,EMF,GEF和WTP,
都是版权所有(c)Eclipse贡献者和其他人。
请访问 http://eclipse.org/



Android开发者工具版权所有(c)Android开源项目。
请访问 http://developer.android.com

解决方案

我有一个类似的问题,看起来像本机支持部分在项目中没有正确设置,或者至少与eclipse / CDT /你可以尝试我做的(使用eclipse 4.2.2,CDT 8.1.2,opencv4android 2.6.4,android sdk 4.3): 1)关闭所有项目,但Opencv库一个(项目浏览器,选择所有项目,但第一个,右键单击关闭项目)



2)右键单击第一个项目。选择Android工具,然后选择添加本机支持...。



3)选择一个唯一的库名称​​而不使用空格(默认名称不要工作)。



4)转到项目属性,c / c ++ build部分现在应该在那里。将build命令更改为$ {NDKROOT} / ndk-build,假设NDKROOT已正确设置。



5)再次右键单击该项目。选择属性> Android,确保在项目构建目标列表中选择了一个Android版本。



6)构建一切,确保一切正常工作



然后,您可以重新打开一个示例项目(例如15个拼图),如果需要,可重复上述操作。



希望您能够构建该示例项目并在手机上启动。


I have eclipse running and am trying to get opencv4android on it (http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/O4A_SDK.html)

Instructions say to go to project -> properties and their will be a C/C++ build to change the location of ndk-build. However, I do not see C/C++ build or general.

When I start eclipse and go to about:

Android Developer Tools

Build: v22.0.1-685705

This product includes Eclipse Platform, JDT, CDT, EMF, GEF and WTP, all of which are Copyright (c) Eclipse contributors and others. Visit http://eclipse.org/

Android Developer Tools are Copyright (c) The Android Open Source Project. Visit http://developer.android.com

解决方案

I had a similar problem, it looks like the "native support" part was not set up correctly in the project, or at least was not compatible with the eclipse / CDT / android sdk combination I have.

You can maybe try what I did (with eclipse 4.2.2, CDT 8.1.2, opencv4android 2.6.4, android sdk 4.3):

1) close all projects but the Opencv Library one (project explorer, select all projects but the first one, right click, "close project")

2) right click on the first project. Select "Android Tools", then "Add native support ...".

3) select a unique library name without spaces (default names don't work).

4) Go to project properties, the "c/c++ build" section should now be there. Change the build command to ${NDKROOT}/ndk-build, assuming NDKROOT was correctly set up before-hand.

5) right click again on that project. Select "Properties > Android", make sure an Android version is selected in the "Project Build Target" list.

6) build everything and make sure everything works at this point.

Then you can re-open one sample project (eg 15 puzzle), and repeat the operations above if needed.

Hopefully you should be able to build that sample project and launch it on your phone.

这篇关于Eclipse从项目属性中缺少C / C ++构建和常规的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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