How to add toolchain to Netbeans for cross compiling

Assume SDK/Toolchain is uncompress to /home/user/Openwrt-SDK, where /home/user is the home directory

 

  1. click Tools ->Options->C++->Add
    01
    01


    • fill
    • Base Directory - /home/user/Openwrt-SDK/staging_dir/toolchain-arm_arm1176jzf-s+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin
    • Tool Chain Family - GNU
    • Tool Collection Name: any name you like, e.g toolchain-arm
    02


  2. on Build Tools tab, fills the fields as following figures, then click Apply
    03


    • under Code Assistance tab, on C Compiler and C++ Compiler tabs
    • delete /usr/include
    • add /home/user/Openwrt-SDK/staging_dir/target-arm_arm1176jzf-s+vfp_uClibc-0.9.33.2_eabi/usr/include
    • finally, click OK.
    03
     
    03