title: P/Invoke g++ from mono in ubuntu OS
body: <p>Is it possible to invoke a g++ executable file's function from mono in Ubuntu? Note that both C++ and C# code compiled in Ubuntu Operation System.</p>
  
  <p>C++ application source:</p>
  
  <pre><code>#include &lt;stdlib.h&gt;
  
  static int32_t Sum(int32_t a, int32_t b){
      return a + b;
  }
  /*
   * 
   */
  int main(int argc, char** argv) {
      return (EXIT_SUCCESS);
  }
  </code></pre>
  
  <p>C# mono application source:</p>
  
  <pre><code>using System;
  using System.Runtime.InteropServices;
  
  namespace MonoCsTest
  {
   class MainClass
   {
  
    [DllImport("/home/.../MonoCsTest/bin/Debug/testcpp")]  
    public static extern Int32 Sum(Int32 a, Int32 b);
  
    public static void Main (string[] args)
    {
     Console.WriteLine (" 5 + 6 = " + Sum(5,6));
    }
   }
  }
  </code></pre>
  
  <p>This throws <code>DllNotFoundException</code></p>