Side-by-Side Configuration Error

Started by
8 comments, last by ltw 14 years, 10 months ago
I'm aware that this problem has been discussed before, but the solutions to those don't seem to be helping me, so I'll ask here. I am creating a C++ program using Visual Studio, and it runs fine on my computers (one running XP and one running Vista), but when anyone else tries to run it, they get the error message "The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more details." No application event log seems to be produced. I'm using Microsoft Visual C++, in Microsoft Visual Studio 2005: Standard Edition. I'm compiling in Release mode, using Multithreaded DLLs. What other information should I be providing?
Advertisement
The people you send should have this installed.

Quote:Original post by Black Knight
The people you send should have this installed.


Is there any way to distribute my program that doesn't require anyone getting it to download the redistributable package?
Yes,you can link statically by changing from multithreaded dll to multithreaded from the project settings.This will add the runtimes into your exe.
All right, compiling as Multithreaded gives me the following errors:

msvcrt.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
msvcrt.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
msvcrt.lib(MSVCR80.dll) : error LNK2005: _exit already defined in LIBCMT.lib(crt0dat.obj)
msvcrt.lib(MSVCR80.dll) : error LNK2005: _fopen already defined in LIBCMT.lib(fopen.obj)
msvcrt.lib(MSVCR80.dll) : error LNK2005: _fclose already defined in LIBCMT.lib(fclose.obj)
msvcrt.lib(MSVCR80.dll) : error LNK2005: __isctype already defined in LIBCMT.lib(isctype.obj)
LIBCMT.lib(crt0init.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
C:\...\arrow.exe : fatal error LNK1169: one or more multiply defined symbols found

Any idea how to deal with that?
Are you using other libs in your project?
Quote:Original post by Black Knight
Are you using other libs in your project?


The Linker page under properties lists "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib", and I've also included SDL.lib and SDLmain.lib.
Quote:Original post by kobuscrispi
Quote:Original post by Black Knight
The people you send should have this installed.


Is there any way to distribute my program that doesn't require anyone getting it to download the redistributable package?


There also is the question why you would not want to redistribute it. Nearly every game requires you to install the redistributable. Just as a lot of other applications require you to download the .NET runtimes.

And another point is that you can't pass a std::string, std::vector between dlls / an executable and a dll (when you use the static CRT). Neither can you pass ownership of heap allocated memory between them.
Quote:Original post by kobuscrispi
The Linker page under properties lists "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib", and I've also included SDL.lib and SDLmain.lib.
You also need to recompile SDL to link with the same runtime library. As SiS-Shadowman says, it's probably just better all round if you require users to install the redistributable.
I encountered similar problem yesterday.
I tryed to install redistributable package on target pc, and test it, the situation is still the same(still have Side-by-Side Configuration Error).
Finally, I build my program and all linked libs with /MT option(instead of /MD), then the problem is solved.

This topic is closed to new replies.

Advertisement