compilation CodeBlocks VS Visual Studio

hi Guys


I have question, I created simple program and wanted to share with someone, this person have windows 7, when he tried to run program it good info about 2-3 different libraries missing. He tried to find it but it turn out this where only for never version of windows :(

but then I recompiled same soft no changes (apart from #pragma once to
#ifndef PEOPLE_H_INCLUDED
#define PEOPLE_H_INCLUDED )

Then this person run program with no issues.

why is that?
visual attaches all programs to the Microsoft libraries whether they need it or not. Debug compiles won't work on other machines that don't have the debug versions of the libraries, and this is the most common cause (msvcrtD) where D means debug. Most likely, if your friend has the latest visual runtime update, and you compiled release instead, it would work.

Hi Jonnin

is there any workaround on that?
Do I have to change something?

thanks :)
compile it in release mode. (Which I said above...)

I don't have the latest VS. The last one I worked on, if you knew all the hundreds of compiler options, you could eventually wrangle it to produce code that didnt have a manifest and didnt need the run-time dlls (static linkage so they were bundled into the executable). It was a pain to set up and it made clunky executables, but it worked. I am not even going to try to figure out how to do that again... its really not worth it. I don't know where the program complexity cutoff is, but at some point, you can't do it anymore, might be if you use any of the gui / os libraries.
Last edited on
Topic archived. No new replies allowed.