- Compiling without dependencies on compiler DLLs
- Posted by Andrew Falanga on May 12th, 2008
Hi,
I built a project in VS 2008 (on WinXP, and the project is taged/
marked as debug) and put the binaries on a Windows Vista machine. The
Vista machine complains that the "side-by-side" configuration is all
messed up (though the error message is a bit more professional than
"messed up"). I figured it had something to do with dlls and a few
searches on Google confirmed that.
In one particular case a programmer, having a similar problem to mine,
posted to microsoft.public.windbg and the respondent made this
comment, "You could also compile the checked/debug build without
dependence upon the compiler DLLs." Where is this option? I've not
been able to find it thus far and I'm not familiar at all with VS.
(For all my previous posts, I've been compiling using the compiler and
linker directly on the command line.)
Andy
- Posted by boris on May 12th, 2008
"Andrew Falanga" <af300wsm@gmail.com> wrote in message
news:10eb4372-24f7-4570-bf9e-019dfc3e29eb@24g2000hsh.googlegroups.com...
Right-click on project name in left-pane (I think it's called Project
Explorer - sorry forgot) and select Properties (or Settings);
Open C/C++ settings->Code generation - there should be 4 options: Debug
Multithreaded (that's statically linked CRT), Debug Multithreaded DLL (DLL
CRT - which is default), and 2 more options for Release builds.
Rebuild the project.
Boris
- Posted by Andrew Falanga on May 13th, 2008
On May 12, 4:59 pm, "boris" <some...@nospam.net> wrote:
Thanks Boris. This seems to have worked, though in VS 2008 there are
many more options than 4 in the Code Generation "page." Interesting
that the choice I made, I changed it from "Multi-Threaded Debug DLL (/
MDd)," to, "Multi-Threaded Debug (/MTd)"; when I did this, the binary
went from 360k to 780k. I wonder why VS would compile a binary over
twice the size that I was getting while compiling from the command
line using make? Interesting.
None the less, your suggestion worked, thanks again,
Andy
- Posted by [Jongware] on May 13th, 2008
Andrew Falanga wrote:
That's the overhead that was stored in the DLLs. If you check your old
version, its size *including the DLLs* is much, much larger. The DLLs
can't be rebuild, so they always come with all bells & whistles. Your
new executable contains (hopefully) only what you need.
By the way, if you're happy with the program, recompile it again
*without* debug info -- that is sure to knock off another huge bite.
360k? You might end up with a final version of less than 200k.
[Jongware]
- Posted by Sebastian G. on May 13th, 2008
[Jongware] wrote:
They can, but since they're SxS loaded and you don't have Microsoft's
private key for signing them, they will be incompatible with any other software.