Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I configured Code::Blocks for Android NDK/JNI development, but there's a trick. Codeblocks believes that it can know what compiler you use, and wants to stop you from using something it does not know. You have to trick it.</p> <ol> <li>Create an empty codeblocks project</li> <li>Add your source and header files (manually)</li> <li>Click the right mouse button on your project in the workspace (the left pane). You will see a menu: <img src="https://i.stack.imgur.com/razbZ.png" alt="the two useful menu items"> <br/>(EDIT: First go to <em>Properties</em> and specify it's a custom Makefile, then to <em>Build options</em>)</li> <li>Go to "Properties" and tell CB it has a custom Makefile. Do not tell it anything close to the truth about the platform: it will tell you that you don't have the required compiler and will not even attempt to build something. <img src="https://i.stack.imgur.com/vh8hD.png" alt="custom makefile"></li> <li>Finally, in the <em>Build options</em>, select the GNU GCC Compiler, go to the "Make commands", and write your custom commands. (Personally I created a Makefile that invokes ndk-build -- I prefer to keep scripts in the text files rather than in GUI dialogs. The item that you might want to change is <code>-j 4</code>)<img src="https://i.stack.imgur.com/zY2pN.png" alt="build options"></li> </ol> <p>And one final note: if your configuration does not work, you get no meaningful diagnostics.</p> <p>PS Here's my Makefile:</p> <pre><code>all: @echo '====all====' pwd;~/android-ndk-r7/ndk-build -j 4 clean: @echo '====clean====' pwd;~/android-ndk-r7/ndk-build clean .PHONY: clean .PHONY: all </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload