VC++ and Release

Hi guys,

I've made my Console program and I've compiled it with the VC++ configuration Release...this will work only for my pc...the program copy some files from a folder in an other folder...in my pc it works but in an other pc it says my that it has copied the files but it isn't true!

PS: I've notice that compiling with VC++ produces an exe of 6 kb but compiling with Dev C++ produces and exe of 466 kb! But with the same problem...I'm desperate xD
Last edited on
For the first question, the description of the problem alone doesn't say much.

For the second question, VC++ uses a shared runtime library all programs compiled by it link to at run time (hence the name). MinGW doesn't, so the code that would otherwise be in the shared library is statically linked into the final executable. If you wrote a program that compiled into a 1 MB executable with VC++, it won't compile into a several MBs executable with MinGW, so don't worry.
Last edited on
ok...so the problem is that I can't run the program on other PCs...

If I run it on my pc it says:

copying files.....
...(it takes about 5 minutes)
FINISH

and I can find the files in my folder correctly...

if the program runs on an other PC it says

copying files.....

and immediatly it says FINISH

so it doesn't copy nothing!
What kind of template did u use? CLR Console Application or Win32 Console Application?
If it was Win32 Console Application, then you may want to try to compile your project using another compiler. E.g: Dev-C++
I've used Win32 Template but I've already tried to compile it with Dev-C++ and I've told you that I've got an executable of 466 kb instead of the 6 kb of the VC++ project...May I try compiling it with VC++ with the CLR console template?
May I try compiling it with VC++ with the CLR console template?
That will create more problems than it will solve.
I think the problem is the system("command"); function....

When the program is running, it always skip this function
Does the one compiled using dev-cpp work on other pcs?

I've told you that I've got an executable of 466 kb instead of the 6 kb of the VC++ project...

Well, why don't you distribute that 466 kb one? Otherwise you will have to download and install these on target machine:
.net framework redistributable (>20Mb) [This can be skipped if u don't use any .net (clr)]
Visual C++ runtime libraries (~2Mb)
If you compile with visual studio you have 6kb exe + 2Mb runtime libs.
Or you could just redistribute that 466 kb exe alone. Which one you would choose? :)
Last edited on
Yes u're right but....the 466 kb doesn't work too with the same problem
In Visual C++ go to

Project -> <Project Name> Properties...
Expand Configuration Properties, Expand C/C++, select Code Generation
On the Runtime Library property change it to Multi Threaded or Multi Threaded Debug (depending on whether or not you are currently on Release or Debug)

Multi Threaded (Debug) DLL is where the redistributed installer comes in (Saves space in initial program by packing the runtime library in a DLL.

Choose Multi Threaded or Multi Threaded Debug if you want to make sure your program works on other people's machines.
closed account (z05DSL3A)
If I run it on my pc it says:

copying files.....
...(it takes about 5 minutes)
FINISH

and I can find the files in my folder correctly...

if the program runs on an other PC it says

copying files.....

and immediatly it says FINISH

so it doesn't copy nothing!


Stupid question, but are the files that you are copying with your program, available to copy on the other computer?
sure....
closed account (z05DSL3A)
OK, so what should your code be doing between outputting copying files..... and FINISH?
Topic archived. No new replies allowed.