"side-by-side configuration is incorrect"

This is a discussion on "side-by-side configuration is incorrect" within the Windows Programming forums, part of the Platform Specific Boards category; Some time ago I wrote a small program in C to help me prepare the invoices for my business. I've ...

  1. #1
    Registered User Sharke's Avatar
    Join Date
    Jun 2008
    Location
    NYC
    Posts
    303

    "side-by-side configuration is incorrect"

    Some time ago I wrote a small program in C to help me prepare the invoices for my business. I've been using it successfully for about a year now. It's an executable which I start from the command line, giving a directory path as an argument. Never once have I had any problems. About three months ago I installed Windows 7, no problems at all.

    However just recently I've reinstalled Windows 7, have done nothing differently yet when I try to start the program as before, I get a "the application has failed to start because its side-by-side configuration is incorrect" error.

    Can anyone tell me, in simple "layman" terms (I can knock out simple programs in C but don't know much about systems) why this might be happening and how I can fix it? The program was compiled with Visual C++ Express, which I don't have installed in my new OS installation yet. Could this be the problem? I did think of this but then again I didn't install it on my last install of Windows 7 and yet my program worked fine.

  2. #2
    Registered User Sharke's Avatar
    Join Date
    Jun 2008
    Location
    NYC
    Posts
    303
    Well I guess I installed VC++ and now it's working. Problem solved! I do however wonder why it worked before with no VC++. Oh well.

  3. #3
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,855
    Sounds like your app is using the libraries (DLLs) dynamically linked (loaded at runtime) rather than staticly linked (built in).

    Until you installed MSVC the correct DLL was not found, causing the app to fail (exact reason was probably in the event viewer).

    I assume that means any Win7 machine without MSVC will not run your app.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  4. #4
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,171
    A common problem. It means you haven't installed the VC++ runtime. Naturally, the software suite itself installs this runtime.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.
    For information on how to enable C++11 on your compiler, look here.
    よく聞くがいい!私は天才だからね! ^_^

  5. #5
    Registered User Sharke's Avatar
    Join Date
    Jun 2008
    Location
    NYC
    Posts
    303
    Is there a way I can recompile my program without such dependencies, so that it can be run on a machine without VC++? Also I'm a little confused as to why it worked fine on my first install of Windows 7, which also had no VC++ installation.

  6. #6
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,171
    I would claim that you should not do such a thing. The runtime should be installed on every machine. There is a good chance many machines already have it installed because professional software uses VC++ and thus have installed it already.
    It's just a one-time install. Putting all dependencies into the EXE will bloat the size.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.
    For information on how to enable C++11 on your compiler, look here.
    よく聞くがいい!私は天才だからね! ^_^

  7. #7
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,586
    It's just a one-time install. Putting all dependencies into the EXE will bloat the size.
    Eh? Your setup and deployment program can handle this. It dependency walks the code and automatically brings in the runtimes as dependencies. During setup it will install them in <install path>/System32/WinSxs with the folder name representing the version of the CRT. It has nothing to do with the EXE except that the EXE is dependency walked to determine what it needs to run.

    This problem occurs a lot when people fail to provide proper installation programs to allow the user to install their application. Windows is telling you it cannot find the CRT. In past times MSVCRT.DLL was used by all C/C++ executables. However as of MSVC 2005 and beyond Microsoft changed all of that and now MSVCRT is no longer used in the same fashion. Now EXEs link with the DLLs found in the WinSxS folder in your System32 folder.

    Incidentally if you look at your event viewer you will find the side by side error in the applications error list. If you double click this it will tell you everything you need to know.

  8. #8
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    20,973
    Quote Originally Posted by Bubba
    Eh? Your setup and deployment program can handle this. It dependency walks the code and automatically brings in the runtimes as dependencies. During setup it will install them in <install path>/System32/WinSxs with the folder name representing the version of the CRT.
    I think Elysia is cautioning against statically linking the dependencies, and by talking about installing them for setup and deployment, you have implied the same despite the "eh?".
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  9. #9
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,171
    What laserlight said is true.
    Quote Originally Posted by Bubba View Post
    ...However as of MSVC 2005 and beyond Microsoft changed all of that and now MSVCRT is no longer used in the same fashion. Now EXEs link with the DLLs found in the WinSxS folder in your System32 folder...
    Yes, they made this in order to make it easier to service the application, they said. However, they're going back to the old pre-2005 model with 2010.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.
    For information on how to enable C++11 on your compiler, look here.
    よく聞くがいい!私は天才だからね! ^_^

  10. #10
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,586
    Yes, they made this in order to make it easier to service the application, they said. However, they're going back to the old pre-2005 model with 2010.
    Typical. Now that we get everything running and working with the side by side stuff they go and change it again. Can someone over there please make up their minds? How are they going to version the CRT if they are just going to allow all of the code to link with one MSVCRT? I actually like the new way of doing it even though it takes some getting used to.

    I think Elysia is cautioning against statically linking the dependencies, and by talking about installing them for setup and deployment, you have implied the same despite the "eh?".
    I see that now and it makes more sense after reading Elysia's post a few more times.
    Last edited by VirtualAce; 02-09-2010 at 06:27 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. placing two bmp images side by side
    By nina_code in forum C++ Programming
    Replies: 2
    Last Post: 07-14-2009, 11:10 AM
  2. Doxygen failing
    By Elysia in forum A Brief History of Cprogramming.com
    Replies: 19
    Last Post: 04-16-2008, 01:24 PM
  3. OpenGL example cube is black, white, grey only
    By edwardtisdale in forum Windows Programming
    Replies: 7
    Last Post: 09-22-2007, 02:37 PM
  4. Strange side effects?
    By _Elixia_ in forum C Programming
    Replies: 4
    Last Post: 08-16-2005, 03:25 PM
  5. Serial Communications in C
    By ExDigit in forum Windows Programming
    Replies: 7
    Last Post: 01-09-2002, 09:52 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21