How to use CodeLite as IDE for Android NDK project?

General questions regarding the usage of CodeLite
aaulia
CodeLite Enthusiast
Posts: 23
Joined: Wed Aug 20, 2008 10:45 pm
Contact:

How to use CodeLite as IDE for Android NDK project?

Post by aaulia »

Or to be more specific SDL Android (NDK) Project. I think this will involve custom makefile project, am I correct? I want to know how to setup CodeLite to handle the NDK side of the project so I can
  • Provide code completion from the NDK (not from the system)
  • Handle building the project using NDK
So I can goto CodeBlock, build the project and build the Android APK from Eclipse afterward.
Thank you.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: How to use CodeLite as IDE for Android NDK project?

Post by eranif »

I dont see the difference between NDK and any other SDK out there
To get code completion - follow the wiki page here: http://codelite.org/LiteEditor/SettingUpCodeCompletion
aaulia wrote:Handle building the project using NDK
You will need to provide a concrete example here as my knowledge with NDK is 0

For example, how would you compile it from a command line?

Eran
Make sure you have read the HOW TO POST thread
aaulia
CodeLite Enthusiast
Posts: 23
Joined: Wed Aug 20, 2008 10:45 pm
Contact:

Re: How to use CodeLite as IDE for Android NDK project?

Post by aaulia »

Simply by calling

Code: Select all

ndk-build
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: How to use CodeLite as IDE for Android NDK project?

Post by eranif »

In that case, define your project as a custom make file:

next, go to: project settings -> customize

- Check the option that says "enable custom makefile"
- Double click on the "Build" in the list and enter the build command (you can enter complex commands like: cd working-dir && ndk-build )

You can read more about it here (it explains how to use cmake within codelite, the principle remains) :

http://codelite.org/LiteEditor/CustomMakefiles
Eran
Make sure you have read the HOW TO POST thread
aaulia
CodeLite Enthusiast
Posts: 23
Joined: Wed Aug 20, 2008 10:45 pm
Contact:

Re: How to use CodeLite as IDE for Android NDK project?

Post by aaulia »

Ah thanks eranif, it works. Pretty simple.

EDIT: Is there anyway for the project to have the completion search path overwrite the global one, just for that project? I want to use Android NDK g++/clang headers instead of my OS's headers (which might not be compatible). Thanks.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: How to use CodeLite as IDE for Android NDK project?

Post by eranif »

Right click the workspace icon and select 'Workspace settings'
Or on the project level: open the project settings -> code completion

Place your completion paths there instead of the global ones

Eran
Make sure you have read the HOW TO POST thread
Post Reply