C++ code is running in Windows 7 but not in windows 10

Hi All,

I have build my project on Windows 7 64-bit on Visual Studio 10(I know its old but I dont have option).

In Visual Studio build setting is Debug 32-bit

I am able to run exe from windows 7.
When I tried to run the same exe from windows 10 64-bit I am not able to run it.

Anyone could help me here to resolve this issue?


Regards,
Akash
Rebuild as 64-bit
Google much?
https://www.google.com/search?q=run+32+bit+app+on+windows+10

For example
https://docs.microsoft.com/en-us/windows/win32/winprog64/running-32-bit-applications
https://www.howtogeek.com/228689/how-to-make-old-programs-work-on-windows-10/
https://superuser.com/questions/961171/run-32bit-applications-on-windows-10-64-bit

> When I tried to run the same exe from windows 10 64-bit I am not able to run it.
What?

"Y: Hello, doctor, my foot hurts".
blah blah blah time wasting
"D: You'd better come into the surgery then"
"Y: I can't, the crocodile won't let go."

http://www.catb.org/esr/faqs/smart-questions.html#beprecise
Thanks all for reply.

@salem c

What?

All links you have put here is helpless.
Either you did not get the question and just did google and pasted here. That's actually I did not accept.

But its ok at least you tried to help here.
What is the problem? Are dlls missing?
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.
In Visual Studio build setting is Debug 32-bit

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.
Hi Furry Guy,

you caught it correctly.
I have guess the same.

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'
Last edited on
It looks like somehow the Xerces 3rd party library was built as 64-bit, not 32-bit.

You have another problem lurking there, building the appropriate "bitness" version of the library.

The only instructions I could find for building this library using VS shows how to build it 64 bit.
Last edited on
Hey Problem solved. Thanks Furry Guy.

Thanks all to understand the issue I have post and help me to resolve the same, and thanks to those who pretend so.

Issue was:
Unable to run the XYZ.exe on different machine.(Machine: Win 10 64-bit)

Cause:
It happened because, I have built XYZ project in Debug mode.(Machine: Win 7 64-bit)

Resolution:
I have built XYZ project in Release mode.

And then able to run XYZ.exe in other machine.

Thanks all.
Topic archived. No new replies allowed.