Converting .cpp to windows compatible .exe

I tried using g++ example.cpp -o example.exe which allows the compiled .exe to work on my linux system(Ubuntu), but when I try to execute on Windows it says it needs to be compatible between x32 and x64 bit machines. Any help out there?
Did you recompile the cpp on the windows system?
No this is a simple program that I compiled with g++ on a linux server.
You need to recompile it on the Windows system, or find a cross-compiler that will run on your Linux system and produce a Windows executable.
Topic archived. No new replies allowed.