title: Trying (and failing) to run Hello World 32-bit C++ program on 64-bit Ubuntu on Windows 10
body: <p>I configured my new Ubuntu on Windows 10 from scratch in the following way:</p>
  
  <pre><code># apt-get update
  # apt-get install build-essential
  # # Am able to compile now using "g++ -Wall -o Hello-World Hello-World.cpp", the binary is working.
  
  # # To check versions, and that both packages were indeed installed
  # gcc -v
      # make -v
  
  # apt-get install g++-multilib
  # # This also installs gcc-multilib as a dependency
  # # Now able to compile using "g++ -m32 -Wall -o Hello-World Hello-World.cpp
  # # However the binary Hello-World can't be run. Error message "bash: ./Hello-World: cannot execute binary file: Exec format error
  
  # apt-get install lib32gcc1 lib32stdc++6
  # # Those two packages are at this time already both installed and well
  
  # dpkg --add-architecture i386
  # apt-get update
  # apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
  # # Still getting the same error when wanting to ./Hello-World
  </code></pre>
  
  <p>I guess I'm still missing an <code>xyz:i386 library</code>, I just couldn't figure it out by myself which one's still missing. Also I'm not sure if this is an "Ubuntu on Windows"-specific thing, or if this would also have occured when procceeding the same way on a normal Ubuntu 64-bit OS. Do you have any suggestions?</p>
  
  <p>And for completion, this is the content of the <code>Hello-World.cpp</code> file:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int main (int argc, char **argv)
  
  {
  
      cout &lt;&lt; "Hellobaby" &lt;&lt; endl;
  
  return 0;
  }
  </code></pre>