title: Building 32-bit FCGI++ binaries in 64-bit environment in Ubuntu 13
body: <p>Good afternoon.</p>
  
  <p>I'm trying to build 32-bit fcgi++ binaries under my 64-bit env. I configured FCGI++ in the following way:</p>
  
  <pre><code>CC="gcc -m32" ./configure 
  </code></pre>
  
  <p>After typing 'make' I see the some building process and the following errors at the end (snippet is here):</p>
  
  <blockquote>
    <p>gcc -m32 -shared  fcgio.lo  -Wl,--rpath -Wl,/home/eotovchits/Downloads/fcgi/fcgi-2.4.1-SNAP-0311112127/libfcgi/.libs -Wl,--rpath -Wl,/usr/local/lib  /home/eotovchits/Downloads/fcgi/fcgi-2.4.1-SNAP-0311112127/libfcgi/.libs/libfcgi.so  -Wl,-soname -Wl,libfcgi++.so.0 -o .libs/libfcgi++.so.0.0.0
    /usr/bin/ld: i386:x86-64 architecture of input file <code>fcgio.lo' is incompatible with i386 output
    fcgio.lo: In function</code>__static_initialization_and_destruction_0':
    /usr/include/c++/4.8/iostream:74: undefined reference to <code>std::ios_base::Init::Init()'
    /usr/include/c++/4.8/iostream:74: undefined reference to</code>std::ios_base::Init::~Init()'</p>
  </blockquote>
  
  <p>...................... a lot of similar lines ...........................</p>
  
  <blockquote>
    <p>fcgio.lo: In function <code>~basic_ios':
    /usr/include/c++/4.8/bits/basic_ios.h:276: undefined reference to</code>vtable for std::basic_ios >'
    /usr/include/c++/4.8/bits/basic_ios.h:276: undefined reference to <code>std::ios_base::~ios_base()'
    /usr/include/c++/4.8/bits/basic_ios.h:276: undefined reference to</code>vtable for std::basic_ios >'
    /usr/include/c++/4.8/bits/basic_ios.h:276: undefined reference to <code>std::ios_base::~ios_base()'
    fcgio.lo: In function</code>fcgi_istream::~fcgi_istream()':
    /home/eotovchits/Downloads/fcgi/fcgi-2.4.1-SNAP-0311112127/libfcgi/../include/fcgio.h:120: undefined reference to `operator delete(void*)'
    /usr/bin/ld: fcgio.lo: file class ELFCLASS64 incompatible with ELFCLASS32
    /usr/bin/ld: final link failed: File in wrong format
    collect2: error: ld returned 1 exit status</p>
  </blockquote>
  
  <p>I assume that I need some additional 32-bits building environment to make the 32-bits binaries (along w/ all the needed 3rd-party libraries, .a-s and .so-s)</p>
  
  <p>Do you know how can i set up such environment locally along with native 64-bit environment and build my fcgi++ binaries for 32-bits environment?</p>
  
  <p>Thank you.</p>