您的位置:首页 > 编程语言 > C语言/C++

Eclipse missing C/C++ build and general from project properties

2016-04-02 15:04 459 查看
Q: 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. Visithttp://developer.android.com

A:

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.
http://stackoverflow.com/questions/16953548/eclipse-missing-c-c-build-and-general-from-project-properties
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: