none
Error in loadlibrary; incorrect side-by-side configuration

    Question

  • Hi Folks:

    I am running MATLAB 2011b x64 to load a third party dll built in VC++ 2008 with debug x64 option. But I got error message as following:

    Caused by: Error using loaddefinedlibrary The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail.

    I am not sure what is the cause of this problem. I have added msvcr90.dll and msvrp90.dll to C:/Windows/System32;

    Anyone has any thoughts? I got stuck on this for almost a day, and tried many ways, so any of your thoughts is highly appreciated. Thanks.

    Nick

    Tuesday, September 25, 2012 6:47 PM

Answers

  • The third party who supplied you a DLL built with debug info should tell you what to do.  They should not be giving you a DLL built with debug DLL’s.  That’s because it’s not legal to redistribute the debug DLL’s.
     
    With VC2005 and 2008, the DLL’s don’t go into c:\windows\system32, they go into the WinSxS folder instead.  However, it is not enough to install the DLL’s, you need to install the exact versions (bug fix versions) that your third party DLL was built with or you still get issues.  Really, the only supported way of getting the debug DLL’s is to install Visual Studio 2008 and all the DLL updates required for the exact version of the DLL you were given. 
     
    In a pinch, I have manually copied the correct subfolder in WinSxS from a computer with the correct Visual Studio installed, but this is only good if you trust the third party to give you the right thing.
     
    If you are running Vista or later, run SxsTrace.exe from a command line to generate a detailed log of the problem.  It will identify the missing DLL’s and the versions it needs.  You can then go back to the 3rd party who gave you their DLL and ask.
     
    Given all this, I recommend you ask the 3rd party to give you 1) a Release DLL, 2) the VC redist exe that installs the proper release DLL’s that are needed for their DLL to load.
     
    Thanks,
    David
     

    Efficiently read and post to forums with newsreaders: http://communitybridge.codeplex.com
    Thursday, September 27, 2012 1:09 AM
  • This is a dependency issue that may or may not related to VC files. Check the logs in process monitor to see what the program wants. Make sure you deployed all files you used in your DLL.


    Visual C++ MVP

    Tuesday, September 25, 2012 8:47 PM

All replies

  • This is a dependency issue that may or may not related to VC files. Check the logs in process monitor to see what the program wants. Make sure you deployed all files you used in your DLL.


    Visual C++ MVP

    Tuesday, September 25, 2012 8:47 PM
  • The third party who supplied you a DLL built with debug info should tell you what to do.  They should not be giving you a DLL built with debug DLL’s.  That’s because it’s not legal to redistribute the debug DLL’s.
     
    With VC2005 and 2008, the DLL’s don’t go into c:\windows\system32, they go into the WinSxS folder instead.  However, it is not enough to install the DLL’s, you need to install the exact versions (bug fix versions) that your third party DLL was built with or you still get issues.  Really, the only supported way of getting the debug DLL’s is to install Visual Studio 2008 and all the DLL updates required for the exact version of the DLL you were given. 
     
    In a pinch, I have manually copied the correct subfolder in WinSxS from a computer with the correct Visual Studio installed, but this is only good if you trust the third party to give you the right thing.
     
    If you are running Vista or later, run SxsTrace.exe from a command line to generate a detailed log of the problem.  It will identify the missing DLL’s and the versions it needs.  You can then go back to the 3rd party who gave you their DLL and ask.
     
    Given all this, I recommend you ask the 3rd party to give you 1) a Release DLL, 2) the VC redist exe that installs the proper release DLL’s that are needed for their DLL to load.
     
    Thanks,
    David
     

    Efficiently read and post to forums with newsreaders: http://communitybridge.codeplex.com
    Thursday, September 27, 2012 1:09 AM