title: How to I get crosstool-ng C++ compiler working
body: <p>I'm trying to get crosstool-ng working with both C and C++. Even though I've selected C++ while using menuconfig, it doesn't seem to get built. The gcc compiler works as expected but not g++</p>
  
  <p>I'm not sure what I'm doing wrong so any help would be appreciated. </p>
  
  <p>I followed the steps found here:
  <a href="http://briolidz.wordpress.com/2012/02/07/building-embedded-arm-systems-with-crosstool-ng/" rel="nofollow">Building embedded ARM systems with Crosstool-NG</a></p>
  
  <pre><code>$ arm-unknown-linux-gnueabi-cpp main.cpp -o test
  arm-unknown-linux-gnueabi-cpp: main.cpp: C++ compiler not installed on this system
  </code></pre>
  
  <p>NOTE: there is no <code>arm-unknown-linux-gnueabi-g++</code> found on in the bin directory.
  I've tried cross-tool version 1.16.0 and 1.15.3</p>
  
  <pre><code>arm-unknown-linux-gnueabi-cpp -v
  Using built-in specs.
  Target: arm-unknown-linux-gnueabi
  Configured with: /opt/crossArm/.build/src/gcc-4.3.2/configure --build=i686-build_pc-linux-gnu --host=i686-build_pc-linux-gnu --target=arm-unknown-linux-gnueabi --prefix=/opt/crossArm/.build/arm-unknown-linux-gnueabi/buildtools --with-local-prefix=/home/jgarvin/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sysroot --disable-libmudflap --with-sysroot=/home/jgarvin/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sysroot --enable-shared --with-pkgversion='crosstool-NG 1.16.0' --with-float=soft --enable-__cxa_atexit --with-gmp=/opt/crossArm/.build/arm-unknown-linux-gnueabi/buildtools --with-mpfr=/opt/crossArm/.build/arm-unknown-linux-gnueabi/buildtools --enable-target-optspace --disable-libgomp --disable-libmudflap --disable-nls --disable-multilib --enable-languages=c
  Thread model: posix
  gcc version 4.3.2 (crosstool-NG 1.16.0)
  </code></pre>
  
  <h3>Code</h3>
  
  <pre><code>#include&lt;iostream&gt;
  
  using namespace std;
  
  int main(){
     cout&lt;&lt;"Hello World"&lt;&lt;endl;
  return 0;
  }
  </code></pre>
  
  <p>In my <code>build.log</code> file I see C++ option turned on</p>
  
  <pre><code>[DEBUG]    CT_CC_SUPPORT_CXX=y
  </code></pre>
  
  <p>I also see it in the <code>config.log</code>:</p>
  
  <pre><code>configure:3030: $? = 0
  configure:3019: gcc -v &gt;&amp;5
  Using built-in specs.
  COLLECT_GCC=gcc
  COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.6/lto-wrapper
  Target: i686-linux-gnu
  Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
  </code></pre>