When I tried to run the same exe from windows 10 64-bit I am not able to run it.
How does that show?
Bitness should not be an issue; 64-bit Windows has 32-bit subsystem for executing 32-bit binaries.
VS links binaries to some of its runtime (DLLs). Windows 10 should give an error "xxxxd.dll not found" if you have not copied necessary libraries with the binary.
If your binary uses Windows API that was available in Win 7 but no longer in Win 10, then an error should be reported.
> All links you have put here is helpless.
Well do you think your single line "it doesn't work" gives us all the information we need to solve your problem?
And if you haven't read the last link, you need to.
Debug mode. That right there is most likely your problem.
VS links to run-time DLLs for debugging that are different than release run-time DLLs. DLLs that can't be legally redistributed to other machines no matter what Win version.
You try running your debug app on another Win 7 machine that doesn't have VS installed and I'd bet it bombs there as well.
Try compiling in Release mode and see if that takes a crap when run on the Win 10 machine.
To confirm it I have tried it with sample program.
I am trying to compile my project in release mode,
Getting below error and I am trying to resolve it-
xerces-c_3.lib(xerces-c_3_1.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'