Deployment of VC2005 S-Function: MSVCP80 missing

Deployment of Visual Studio 2005 S-Function: MSVCP80/MSVCR80/MSJAVA missing
My s-function created using VC2005 (SP1) is running as intended on the machine on which I created it. When I deploy that S-Function to other machines it crashes on some of them. Using "Dependency Walker" shows up three errors about missing DLLs.
  • On the target machine I found MSVCP80/MSVCR80 installed in ..\WinSxS directory.
  • After some readings I assume that my problem is related to different version numbers of the DLLs
  • Reinstalling "vcredist" didn´t fix the problem.
  1. Is it possible NOT to use any of these DLLs?
  2. If not, how to deploy s-functions to different machines painlessly?
  3. What are the exact project settings for a VC2005 s-Function (e.g. MANIFEST) ...?
Thanks in advance Uwe Creutzburg

 Accepted Answer

I would hope that installing the VC2005 Redistributable would allow your S-Function to work on an arbitrary machine. But, it sounds like you already tried this.
Visual C++ does allow for static linkage of the VC runtime (the /MT switch); you might try using this switch when you link. In MEX, you can add to the the LINKFLAGS settings (see the "Override Option Details" section of the mex documentation -- I'm not sure exactly how this manifests itself in an S-Function).
Unfortunately, I don't have VC2005 installed to actually see if this actually works. :(

More Answers (1)

Workaround helps (thank you)!!
  • Unfortunately, installing VC2005 Redistributable didn´t fix the problem (still version problem)?!
  • Recompile using static linkage works but a bad taste still remains, the linker now throws the Message:
"Linking... Creating library C:\SANDBOX ... ... LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library "
Any idea to solve that warning (using /NODEFAULTLIB leads to non-linkable project)? May I ignore the warning?
Best regards Uwe Creutzburg

Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!