The application has failed to start because its side-by-side configuration is incorrect |
jklioe posted on Saturday, November 24, 2007 10:55 AM
|
M facing a strange issue ... M trying to start a service using
CreateService .
Well this service starts properly in XP ( when I install ) but the
same exe when I try to install in Vista ,the service doesnt start ,If
I try to start the service manually it throws back an error saying
configuration is incorrect" .
This this strange behaviour I observe only in when I build the
application in Release mode .where as Debug mode works fine both in
Vista as well as Xp
Any clue ? |
 |
|
The application has failed to start because its side-by-side configuration is incorrect |
David Ching posted on Monday, November 26, 2007 9:48 AM
|
It's a question bordering on religious.
Static linking
Pros - no other dll's required, DLL-hell eliminated, everything needed to
run your app is included in .exe
Cons - .exe becomes (somewhat) bigger in size, C RTL/MFC code that could
be factored out into dll's is statically linked into each module of your
app, C RTL/MFC code can't be serviced with MS Updates/hot fixes, must ensure
target OS has DLL's compatible with C RTL, e.g. for OLE.
For my usage, static linking is all plus. The cons don't bother me at all.
-- David |
 |
|
The application has failed to start because its side-by-side configuration is incorrect |
Doug Harrison [MVP] posted on Monday, November 26, 2007 4:07 PM
|
On Mon, 26 Nov 2007 00:25:23 -0800 (PST), jklioe <ranu2006@gmail.com>
It's not a question of which is "right", but rather which set of trade-offs
makes sense for you.
Linking dynamically decreases your executable size and allows sharing of
DLLs between processes. It makes it possible to use MFC extension DLLs. It
enables you to take advantage of future fixes to the MFC DLL.
Linking statically relieves you from worrying about deploying the right MFC
DLL (and CRT DLL). It makes you immune to future bugs in the MFC DLL.
For the "cons", logically negate each of the preceding "pros".
By default, I use the DLL version. I use static linking when I don't want
to distribute the MFC/CRT DLLs, and I'd also use it if I were to develop a
COM module in MFC. Using the DLL is bad in the latter context because you
can easily affect the MFC/CRT state of the hosting process, and COM modules
shouldn't do that.
--
Doug Harrison
Visual C++ MVP |
 |
|
I'm not sure the new way of doing things is working out for the best. |
Tom Serface posted on Monday, November 26, 2007 5:17 PM
|
I'm not sure the new way of doing things is working out for the best. I
think MSFT would prefer more people to use the DLLs rather than statically
link, and I've heard from several people that they are doing just the
opposite to "get around the problem". Maybe this is an example of where the
cure is worse than the disease.
Tom |
 |
|
The application has failed to start because its side-by-side configuration is incorrect |
Doug Harrison [MVP] posted on Monday, November 26, 2007 6:27 PM
|
On Mon, 26 Nov 2007 14:17:40 -0800, "Tom Serface"
It probably wouldn't have been that hard to fix. I just reinstalled Vista,
and some of my utility programs wouldn't run. They gave exactly the same
enigmatic side-by-side error, and I guessed they weren't finding the VC80
DLLs, because I hadn't yet installed VS2005. I was planning just to install
VS2008, so I found the correct vcredist_x86.exe for VC2005 at Microsoft
Downloads and installed it. Problem solved! I only later thought to look in
Event Viewer, and for a change, it contained some useful information, in
particular, the name of the DLL. Can't say why the side-by-side message box
couldn't have been as informative.
--
Doug Harrison
Visual C++ MVP |
 |
|
The application has failed to start because its side-by-side configuration is incorrect |
Tom Serface posted on Monday, November 26, 2007 6:40 PM
|
Yeah, that is definitely not an informative message that pops up :o)
Tom |
 |
|
Thanks I was able to solve my problem... |
jklioe posted on Wednesday, November 28, 2007 7:22 AM
|
Thanks I was able to solve my problem...
I had linked dyanamically to MFC , I changed this to statically linked
and it worked out ....
which is the right way to link MFC libraries statically or
dynamically ? |
 |
|