title: Cross compiling portAudio for Intel Edison
body: <p>I am using the cross compile environemt from the <a href="https://software.intel.com/en-us/iot/hardware/edison/downloads" rel="nofollow">Intel Site</a> and have successfully compiled several other libraries using it (libsndfile, alsa, fftw) but when I try to compile portaudio it refuses to link to the proper directories. Here is the error I get:</p>
  
  <pre><code>if test -n " bindings/cpp" ; then for dir in " bindings/cpp"; do make -C $dir all; done ; fi
  make[1]: Entering directory '/home/theslat/Downloads/portaudio/bindings/cpp'
  Making all in lib
  make[2]: Entering directory '/home/theslat/Downloads/portaudio/bindings/cpp/lib'
  /bin/sh ../libtool --tag=CXX   --mode=link i586-poky-linux-g++  -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -mstackrealign -fno-omit-frame-pointer --sysroot=/usr/edison/sysroots/core2-32-poky-linux  -O2 -pipe -g -feliminate-unused-debug-types -version-info 0:12:0 -no-undefined -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o libportaudiocpp.la -rpath /usr/local/lib BlockingStream.lo CallbackInterface.lo CallbackStream.lo CFunCallbackStream.lo CppFunCallbackStream.lo Device.lo DirectionSpecificStreamParameters.lo Exception.lo HostApi.lo InterfaceCallbackStream.lo MemFunCallbackStream.lo Stream.lo StreamParameters.lo System.lo SystemDeviceIterator.lo SystemHostApiIterator.lo ../../../lib/libportaudio.la 
  libtool: link: i586-poky-linux-g++  -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -mstackrealign -fno-omit-frame-pointer --sysroot=/usr/edison/sysroots/core2-32-poky-linux  -fPIC -DPIC -shared -nostdlib /usr/edison/sysroots/core2-32-poky-linux/usr/lib/crti.o /usr/edison/sysroots/core2-32-poky-linux/usr/lib/i586-poky-linux/4.9.1/crtbeginS.o  .libs/BlockingStream.o .libs/CallbackInterface.o .libs/CallbackStream.o .libs/CFunCallbackStream.o .libs/CppFunCallbackStream.o .libs/Device.o .libs/DirectionSpecificStreamParameters.o .libs/Exception.o .libs/HostApi.o .libs/InterfaceCallbackStream.o .libs/MemFunCallbackStream.o .libs/Stream.o .libs/StreamParameters.o .libs/System.o .libs/SystemDeviceIterator.o .libs/SystemHostApiIterator.o   -Wl,-rpath -Wl,/home/theslat/Downloads/portaudio/lib/.libs -Wl,-rpath -Wl,/usr/local/lib ../../../lib/.libs/libportaudio.so -L/usr/edison/sysroots/x86_64-pokysdk-linux/usr/bin/i586-poky-linux/../../lib/i586-poky-linux/gcc/i586-poky-linux/4.9.1 -L/usr/edison/sysroots/x86_64-pokysdk-linux/usr/bin/i586-poky-linux/../../lib/i586-poky-linux/gcc -L/usr/edison/sysroots/core2-32-poky-linux/lib -L/usr/edison/sysroots/core2-32-poky-linux/usr/lib/i586-poky-linux/4.9.1 -L/usr/edison/sysroots/core2-32-poky-linux/usr/lib /usr/lib/libstdc++.so -lm -lc -lgcc_s /usr/edison/sysroots/core2-32-poky-linux/usr/lib/i586-poky-linux/4.9.1/crtendS.o /usr/edison/sysroots/core2-32-poky-linux/usr/lib/crtn.o  -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -mstackrealign --sysroot=/usr/edison/sysroots/core2-32-poky-linux -O2 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed   -Wl,-soname -Wl,libportaudiocpp.so.0 -o .libs/libportaudiocpp.so.0.0.12
  /usr/lib/libstdc++.so: error adding symbols: File in wrong format
  collect2: error: ld returned 1 exit status
  make[2]: *** [Makefile:311: libportaudiocpp.la] Error 1
  make[2]: Leaving directory '/home/theslat/Downloads/portaudio/bindings/cpp/lib'
  make[1]: *** [Makefile:333: all-recursive] Error 1
  make[1]: Leaving directory '/home/theslat/Downloads/portaudio/bindings/cpp'
  make: *** [Makefile:251: all-recursive] Error 2
  </code></pre>
  
  <p>It seems like it is trying to link against my computers normal libstdc++ and I don't know why. I have tried feedin <code>configure</code> a variaty of LDFLAG with the right directories and have reinstalled the toolchain and all my multilibs but no luck.</p>