|
From: Bill D. <bdu...@va...> - 2006-06-19 11:01:25
|
> Hello > I am working on windows xp. Within a folder I have an application=20 > compiled with mingw and several dll's which the application is = depending=20 > upon. However, there are also dll's in this same folder which the=20 > application is not depending upon. My Problem is, that the application = > compiled with mingw does load all the dll's in this folder. Does = anybody=20 > know how to avoid this, so the application does only load the dll's=20 > which it really depends on? > Any help is very much appreciated! > thanks, patrik There is an application that comes with Visual Studio called Dependancy Walker (or depends.exe) that shows all the dependencies your executable = or dll has on other dlls. Maybe there are some free knock-offs of = Depends.exe on the net. If you think you have unnecessary dlls in your app's = folder, then start removing the suspects one-by-one into a backup folder. The system will tell you if you are missing something when you run your app again. Remember DLL stands for dynamically linked library. This really = has nothing to do with loading except that everything that one DLL is dynamically linked to is also loaded at start-up time. For = demand-loading use COM (does MingW do that?) or LoadLibrary() and GetProcAddress(). = One more trick is to build a dummy dll with a dummy function or two that = breaks off the chain at a weak point in the DLL tree. Do this only if you know those dummy functions aren't used anywhere in your app's threads. Thanks, Bill |