i just wanna know how can i run my exe file in other machine, when i write a program and build it ,i can run its exe file just in my computer if i copy that exe file to another computer i doesn't work
Printable View
i just wanna know how can i run my exe file in other machine, when i write a program and build it ,i can run its exe file just in my computer if i copy that exe file to another computer i doesn't work
I've had this problem too... When i think of it, maybe you need to compile it as 'release' instead of 'debug' but I dunno :P
Is this a release build or a debug build? What IDE/compiler are you using? Your chosen IDE may have installed specific runtime libraries (DLLs) that make your code work on your development machine. Unless the target machine has those runtime libraries installed on it as well (or unless you compile with specific options that disable calls to code specific to those runtime libraries), it will not work.
There are several things that MAY affect this.
Most important of all, any dependency of your .exe (such as DLL's) need to be on the other machine too. The debug libraries from Microsoft are not allowed to be distributed outside of those that have a license for the compiler, which may be solved by compiling a release version of the code.
You may also have other packages that your code depends on that isn't on the other machine.
And finally, you may be using functionality that the other machine doesn't have (e.g. using Vista Only functons on XP will not work).
--
Mats
i don't think debug or release will give any effects on that...
debug is bigger because it contains debugging info...not its dependency...
and release version is a bit optimized....
that's all...
i agree with matsp said...
to minimize its dependency, try to always use static library...