Installing the NDK installer C :: B template
- Download the installer
NDK C::B template
CodeBlocksNdkTemplate v.0.0.14.79 / win32 (07/03/2019) - Run the installer and install the
NDK C::B template
- If you did not select the “Overwrite C::B template configuration (v.17.12)” option during installation, you need to register the template yourself in the
Code :: Blocks
configuration file. - Edit the file
config.script
and add the template to the list used.
Editing the C::B file with config.script
The file must be in the following path:
<CodeBlocks base directory>\share\CodeBlocks\templates\wizard\config.script
You must add the following code to the RegisterWizards()
function:
function RegisterWizards()
{
//...
RegisterWizard(
wizProject,
_T("ndk_android"),
_T("NDK Android"),
_T("Native")
);
//...
Before using the template, after making these changes, you must restart C::B
NDK C::B template Wizard
Features
Bug?: unfortunately I did not find a direct way to add debugger parameters directly to the
C::B
project using its API.
Currently, the debugger parameters are entered into theExtensions/debugger1
section, but for operation it is necessary that these parameters be in theExtensions/debugger
section.
After creating the project, use the editor to remove theExtensions/debugger
section and rename theExtensions/debugger1
section toExtensions/debugger
.
An example of the contents of this section is given below.
<debugger>
/// One actually platform path
// <search_path add="obj/local/arm64-v8a" />
// <search_path add="obj/local/x86" />
// <search_path add="obj/local/x86_64" />
<search_path add="obj/local/armeabi-v7a" />
<remote_debugging target="Debug">
<options
conn_type="0"
serial_baud="115200"
ip_address="127.0.0.1"
ip_port="59999"
additional_cmds_before="set solib-search-path obj/local/armeabi-v7a
file obj/local/armeabi-v7a/$(TARGET_OUTPUT_BASENAME)
"
/>
</remote_debugging>
</debugger>
Attention!: the
cbp2ndk
andandroid-elf-cleaner
utilities used inNDK C::B template
are built for the 32bit version of Windows.
If you are using a 64bit platform and want to have executable files of the corresponding bitness, you need to rebuild the project yourself.
Thecbp2ndk
andandroid-elf-cleaner
utilities inC::B
are located along the following path:
<CodeBlocks base directory>\share\CodeBlocks\templates\wizard\ndk_android\exec\
License
MIT