[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

MSVCR71.DLL Dependency

Posted on 2005-04-11
10
Medium Priority
?
671 Views
Last Modified: 2011-10-03
Hi there,

I have an application which seems to have magically encountered a dependency for the MSVCR71.DLL library.  My understanding is that this is for use by .NET applications, my application is a standard Win32 app.

I've checked using dependency walker as to what functions this library exposes that I could possibly be using but there is nothing obvious that shouldn't be able to be found in MSVCRT.DLL.

How would I remove this dependency?  the includes I am using are

#include <Winsock2.h>
#include <windows.h>
#include <gdiplus.h>
#include <streams.h>
#include <wmsdk.h>
#include <comdef.h>      
#include <windowsx.h>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>
#include <stdio.h>
#include <list>
#include <string>
#include <string.h>
#include <time.h>
#include <iostream>
#include <Imagehlp.h>
#include <msxml2.h>
#include <map>
#include <math.h>

Thanks loads in advance!!!
0
Comment
Question by:tcarmich
  • 3
  • 3
  • 2
  • +1
10 Comments
 
LVL 30

Expert Comment

by:Axter
ID: 13753252
Hi tcarmich,
>>#include <streams.h>
>>#include <Imagehlp.h>
I don't recongnise those headers.

Are you sure they're VC++ 6.0 compatible headers?

David Maisonave :-)
Cheers!
0
 
LVL 30

Expert Comment

by:Axter
ID: 13753299
My VC++ compiler complains about the following headers:
//#include <gdiplus.h>
//#include <streams.h>
//#include <wmsdk.h>
//#include <msxml2.h>

I would check msxml2.h and gdiplus.h to make sure they're compatible with VC+++ 6.0.

Also make sure you have the latest SDK for above headers.
0
 
LVL 86

Expert Comment

by:jkr
ID: 13753337
>>encountered a dependency for the MSVCR71.DLL library.  My understanding is that this is for use by .NET
>>applications, my application is a standard Win32 app.

No - MSVCR71.DLL is the standard C runtime for VC7.1 and is not related to .NET at all.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 86

Expert Comment

by:jkr
ID: 13753365
Sorry, disregard the above comment - see  http://msdn.microsoft.com/library/en-us/vclib/html/_crt_c_run.2d.time_libraries.asp ("C Run-Time Libraries"):

What is the difference between msvcrt.dll and msvcr71.dll?
The msvcrt.dll is now a "known DLL," meaning that it is a system component owned and built by Windows. It is intended for future use only by system-level components. An application should use and redistribute msvcr71.dll, and it should avoid placing a copy or using an existing copy of msvcr71.dll in the system directory. Instead, the application should keep a copy of msvcr71.dll in its application directory with the program executable. Any application built with Visual C++ .NET using the /MD switch will necessarily use msvcr71.dll.

Does the last statement apply?
0
 

Author Comment

by:tcarmich
ID: 13753525
Right,

gdiplus.h is used to reference GDI+ which comes as standard with Windows XP
Imghelp.h is used for obtaining PE Header information and is standard to Windows XP
streams.h is for DirectShow and previously hadn't shown a dependency to the VC7.1 runtime
msxml2.h is used for XML DOM manipulation using components standard to Windows XP

I am using VC7.1 to compile the application and up to now have had no dependencies on this file, it just snuck in somewhere along the lines.  I cannot use this as I need to only use components native to a standard XP installation.

Is there any way that I can find out more about what part of my application is using the DLL?

Thanks loads for your help thus far, most appreicated.
0
 
LVL 3

Expert Comment

by:mactep13
ID: 13754240
In that case, do not use any of the C Runt-Time functions such as strcpy, strcat and others. See MSDN on what C Run-Time functions are. If you do not use any of them, then your application will not need a MSVCR71.DLL.
0
 
LVL 3

Expert Comment

by:mactep13
ID: 13754258
Here is a list of C Run-Time Functions:
C Runtime Library Functions
 
_cabs
_chgsign
_clearfp
_controlfp
_copysign
_ecvt
_fcvt
_finite
_fpclass
_fpieee_flt
_fpreset
_gcvt
_hypot
_isnan
_itoa
_itow
_j0
_j1
_jn
_logb
_lrotl
_lrotr
_ltoa
_ltow
_matherr
_memccpy
_memicmp
_msize
_nextafter
_rotl
_rotr
_scalb
_snwprintf
swprintf
swscanf
_statusfp
_swab
_ultoa
_ultow
vswprintf
_wcsdup
_wcsicmp
_wcslwr
_wcsnicmp
_wcsnset
_wcsrev
_wcsset
_wcsupr
_wtoi
_wtol
_y0
_y1
_yn
abs
acos
asin
atan
atan2
atoi
atol
ceil
cos
cosh
difftime
div
exp
fabs
floor
fmod
free
frexp
iswalnum
iswalpha
iswascii
iswcntrl
iswctype
iswgraph
iswlower
iswprint
iswpunct
iswspace
iswupper
iswxdigit
labs
ldexp
ldiv
log
log10
longjmp
malloc
mbstowcs
memchr
memcmp
memcpy
memmove
memset
modf
pow
qsort
rand
realloc
sin
sinh
sqrt
srand
strcat
strchr
strcmp
strcpy
strcspn
strlen
strncat
strncmp
strncpy
strstr
strtok
tan
tanh
towlower
towupper
wcscat
wcschr
wcscmp
wcscpy
wcscspn
wcslen
wcsncat
wcsncmp
wcsncpy
wcspbrk
wcsrchr
wcsspn
wcsstr
wcstod
wcstok
wcstol
wcstombs
wcstoul
wsprintf (must support dbls)
0
 

Author Comment

by:tcarmich
ID: 13754909
Wow, but I use a few of those as they are quite essential, such as the math ceil and floor functions.  Is there no way I can force to the older DLL?
0
 
LVL 3

Accepted Solution

by:
mactep13 earned 2000 total points
ID: 13755139
What do you mean an older dll? MSVCRT.DLL is a run-time dll that is shipped with VC 6.0, not windows. Since you're using VC 7.1, you need MSVCR71.DLL.
You may try to link run-time statically. In the Project Properties, under C++ |Code Generation, Set the value for Runtime Library to either Multi-threaded or Single-Threaded, but do not use DLLs. This will link the runtime libs statically into your app and in theory should not require the DLL to be present. I have not tested this, that is why I am saying in theory. But the documentation I got from MSDN states that it should work. So you may give it a try.

Hope this helps.
mactep
0
 

Author Comment

by:tcarmich
ID: 13755198
Okay I shall have a try, I didn't realise that this was the issue.  Thanks loads for your help that has actually explained quite allot!  I'll give you the kudos.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question