Aim: Cross-Compile a cpp code on Linux and execute it on Windows.
- Native System : Ubuntu 14.04 (64bit).
- Compilation Env on Native : mingw-w64
- Target System : Windows 10 (64 bit)
- Running Env on Target : cygwin
After looking around through a bunch of stuff, I installed mingw-w64 on the Linux and generated a helloWorld.exe file using the mingw-w64-g++.
This compilation was successful. When running the helloWorld.exe on Windows, it initially gave an error of libstdc++-6.dll missing.
On adding the path to the DLL from the MinGW installation on Windows into the PATH variable, the exe runs and terminates without any output.
It exits with error code 127 [Command Not Found].
I looked at several search results obtained from the "Questions that may already have your answer" suggestions, but none had the exact question.