pouët.net

Visual studio 2008 and vcredist_x86.exe requirements

category: code [glöplog]
Hi all,

I must have changed something in our codebase last year because, since then, the executables that I compile require vcredist_x86.exe to run (otherwise you get a fat crash at the beginning).

This is a bit annoying. I understand that I need to link statically something but for the love of god I don't know what or how to do so in visual studio 2008.

Maybe I'm including some rotten version of a header file that is not needed.


any ideas?
added on the 2010-07-28 12:06:52 by Navis Navis
Is it just a case of setting "Project -> Properties -> C/C++ -> Code Generation -> Runtime Library" to "Multi-threaded Debug"? I think it uses "Multi-Threaded Debug DLL" by default.
added on the 2010-07-28 12:19:02 by evilpaul evilpaul
i guess you dont mean /MT ?
added on the 2010-07-28 12:22:55 by the_Ye-Ti the_Ye-Ti
or link to some older MSVCRT.LIB
added on the 2010-07-28 12:31:44 by Gargaj Gargaj
currently I set it to /MT. Should I change that to something /MD (multithreaded DLL)
added on the 2010-07-28 12:56:01 by Navis Navis
/MT should be the right setting, though it creates bigger executables. Maybe some other part of the application uses the Redist. You could use "\Microsoft Platform SDK for Windows Server 2003 R2\Bin\depends.exe" to run the application to see where the dependency comes from.
added on the 2010-07-28 13:27:19 by raer raer
I had found this post which describes how to deal with all those annoying vs dependencies.
added on the 2010-07-28 14:35:30 by Optimus Optimus
/Zi ?
/MT (and /MTd) is the right switch to use, but if I remember correctly, it needs to be set for *all* libraries that are part of the executable. IOW, if you link against any static libraries that were compiled with /MD or /MDd, you get dependencies on those nasty SxS DLLs again. (Please correct me if I'm wrong.)
added on the 2010-07-28 15:43:00 by KeyJ KeyJ
Jup. Right. Or the DLLs you use try to load the SxS ones.
added on the 2010-07-28 16:26:38 by raer raer
what does the manifest say? (or try dropping it?)
added on the 2010-07-28 16:35:11 by quisten quisten
on a completely unrelated note, i recently tried MSVC 2010 Express and the IDE was so slow that I had to turn off intellisense all together to get it to be responsive in an acceptable way. Admitted, it was a slow computer, but still. After some weeks I went back to 2008 Express and it was all fine and dandy. Anybody else experienced this?
added on the 2010-07-28 17:07:34 by skrebbel skrebbel
VS is getting shittier with every version...
added on the 2010-07-28 17:25:01 by raer raer
skrebbel - no, it was faster even on my old laptop, which isn't that new. This was the full version though.
added on the 2010-07-28 18:27:03 by hornet hornet
These dependencies are indeed a royal pain in the bunghole. Compile _everything_ with Multi-threaded, /MT (not DLL), as was suggested before. Also, debug builds don't work with the Redist package on machines without _your_ VC version installed, only release builds.
added on the 2010-07-28 18:31:18 by trc_wm trc_wm
vs10e is getting fancier and fancier. it was quite slow on my work pc too - however, it looked great :)
for people with slow VS 2010s, this may help:

Tools|Options|Environment|General
uncheck 'automatically adjust visual experience...'
uncheck 'use hardware graphics acceleration' and 'enable rich client experience'

It's all WPF (yay me!) so many things are done in HW, and if your HW is awful (or is busy with other things) then VS can be sketchy.

Or if you're like me, and you have to open a sln with 600+ projects in it (Silverlight is ONE BIG sln) then your only choice is to get a solid-state drive.
added on the 2010-07-28 19:36:21 by GbND GbND
GbND - yay for you, nice insight there :) - Now go lobby for free visual studio-licences for demosceners! :)
(express doesn't install visual assist == sad panda)
added on the 2010-07-29 01:03:27 by hornet hornet
gbnd, my experience was mostly that every time i saved a .cpp file, intellisense spent 2 minutes doing whatever it thought it needed doing, nigh-on freezing the GUI and taking over my (slow) HDD. but yeah, the gui was sluggish too (sloppy HW here indeed) - thanks for the tips!

Quote:
(Silverlight is ONE BIG sln)

wow :-)
added on the 2010-07-29 09:08:47 by skrebbel skrebbel
Or intellisense is running while(true) again, and again, and then again... though I changed: NOTHING.
Just my impression with VS 2008. And then it doesn't work in some cases too.
I must say in defense though, that our codebase is the worst shit I have ever seen in my entire life.

@ hornet: Also VC Express doesn't have all the optimization options the Pro versions have. And you can't do profiling. And...
added on the 2010-07-29 10:27:05 by raer raer
VS2010 works great at my work machina, admittedly, it's an eight core i7 with an ATI HD5700, but it works MUCH faster than 2008 on the same machine.

I have it installed at home too (Phenom X4), but I don't usually code at home these days so I haven't had the chance to compare it.

I have intellisense and all the fancy stuff enabled in it (plus using tons of LINQ and other custom object extensions, which compile and integrate on intellisense), and I compared it with VS2008 with and without Resharper installed.

At work, I code c# only so I wouldn't know if it's any different for CPP
added on the 2010-07-29 12:06:18 by Jcl Jcl
[quote="RareWtFailWhale"]And you can't do profiling.[/quote]
http://www.codersnotes.com/sleepy. You want this.
added on the 2010-07-29 19:46:23 by ryg ryg
thanks for that ryg.
added on the 2010-07-29 19:50:28 by superplek superplek
@hornet: yeah, that's what the express versions are intended for. It's nice that we finally don't require money for the compiler, just the extras though... isn't it?

@skrebbel: intellisense fucking murders me over and over.
One thing you can try is another app called 'source insight' which parses symbols in the background only when your machine is idle. It's what many devs here use, the gfx team included, since they can't use VS.
added on the 2010-07-29 20:17:20 by GbND GbND
Quisten: Run-Time Error R6034.

Hehe. Microsoft entered a new circle of dll-hell with manifests and SxS. Fatass executables for the people! All third party libs statically compiled with different dll versions and you might have had size problems back in the 64 Mb days. Now, 128 Mb is enough for everybody. ;)

For profiling: If you need bigger guns, AMD CodeAnalyst profiler is still free and integrates with Visual Studio. It might not have the firepower of VTune but it handles multithreading, multicore and all that jazz.
added on the 2010-07-29 22:19:01 by Yomat Yomat

login