MSVCR80D.dll: how to avoid?
- dejudicibus
- Knows some wx things
- Posts: 32
- Joined: Mon Dec 20, 2004 10:28 am
- Location: Rome, Italy (EU)
- Contact:
MSVCR80D.dll: how to avoid?
I just migrated from bcc 5.5 to VS 2500 express. At last I was able to generate an exe file but... it fails because it is expecting MSVCR80D.dll.... What's that, and why is it necessary? I used /MDd because /MTd generates a lot of errors about StringData::Free() not resolved... I do not want that my application would depends on dll.Any way to have a simple EXE file with no additional dependencies?
Dr. Dario de Judicibus
Site: http://www.dejudicibus.it
Blog: http://lindipendente.splinder.com
Book: http://www.lalamanera.it
Site: http://www.dejudicibus.it
Blog: http://lindipendente.splinder.com
Book: http://www.lalamanera.it
-
- I live to help wx-kind
- Posts: 194
- Joined: Fri Feb 17, 2006 4:16 am
- Location: Singapore
- Contact:
To load debug C Runtime Library you need a manifest file. Please check whether the manifest generation is set to yes or not.
To check this,
Always keep the manifest file and exe file in same directory. That would solve your problem.
Regards,
Biplab
To check this,
- Open the Project
- Click Project > {Project Name} Properties menu option
- Go to Configuration Properties > Linker > Manifest file and set the Generate Manifest option on the right to Yes
Always keep the manifest file and exe file in same directory. That would solve your problem.
Regards,
Biplab
- dejudicibus
- Knows some wx things
- Posts: 32
- Joined: Mon Dec 20, 2004 10:28 am
- Location: Rome, Italy (EU)
- Contact:
OK, I did. I reverted to /MTd and set Manifest to Yes. Compile is OK, link gives no more previous errors, but now I get
duplicate resource. type:MANIFEST, name:1, language:0x0409
... I thuink I am close, but there is still to fix this one. What I did wrong?
PLease, note that I DID use
#ifdef __WXDEBUG__
#define wxUSE_NO_MANIFEST 1
#endif
#include "wx/msw/wx.rc"
in my application rc file
duplicate resource. type:MANIFEST, name:1, language:0x0409
... I thuink I am close, but there is still to fix this one. What I did wrong?
PLease, note that I DID use
#ifdef __WXDEBUG__
#define wxUSE_NO_MANIFEST 1
#endif
#include "wx/msw/wx.rc"
in my application rc file
Dr. Dario de Judicibus
Site: http://www.dejudicibus.it
Blog: http://lindipendente.splinder.com
Book: http://www.lalamanera.it
Site: http://www.dejudicibus.it
Blog: http://lindipendente.splinder.com
Book: http://www.lalamanera.it
-
- I live to help wx-kind
- Posts: 194
- Joined: Fri Feb 17, 2006 4:16 am
- Location: Singapore
- Contact:
If you are using /MTd option, then there is no need to set the Generate Manifest option to Yes.
From MSVC 8 onwards, in order to load debug dll, you need to use a manifest file. If you are using /MTd or /MT option, then the code needed for debug crt gets embedded.
Solution is-
Regards,
Biplab
From MSVC 8 onwards, in order to load debug dll, you need to use a manifest file. If you are using /MTd or /MT option, then the code needed for debug crt gets embedded.
Solution is-
- Use /MDd option
- Goto Linker > General in Project Properties menu and set Enable Incremental Linking to No.
- Go to Manifest Tool > Input and Output in Project Properties menu and set Additional Manifest Files to $(IntDir)\$(TargetFileName).intermediate.manifest
- In the same Page, set Embed manifest to Yes
- In the same Page, set Output Manifest File to $(IntDir)\$(TargetFileName).exe
Regards,
Biplab
- dejudicibus
- Knows some wx things
- Posts: 32
- Joined: Mon Dec 20, 2004 10:28 am
- Location: Rome, Italy (EU)
- Contact:
I tried what you said but I getbiplab wrote:...
Solution is-Now you won't see the manifest file in the output dir. But the manifest file will now be embedded inside the exe file. Now the exe file can load Debug C Runtime DLL without any problem.
- Use /MDd option
- Goto Linker > General in Project Properties menu and set Enable Incremental Linking to No.
- Go to Manifest Tool > Input and Output in Project Properties menu and set Additional Manifest Files to $(IntDir)\$(TargetFileName).intermediate.manifest
- In the same Page, set Embed manifest to Yes
- In the same Page, set Output Manifest File to $(IntDir)\$(TargetFileName).exe
LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
P.S. Output Manifest File should be $(IntDir)\$(TargetFileName), since filename already contains extension...
Dr. Dario de Judicibus
Site: http://www.dejudicibus.it
Blog: http://lindipendente.splinder.com
Book: http://www.lalamanera.it
Site: http://www.dejudicibus.it
Blog: http://lindipendente.splinder.com
Book: http://www.lalamanera.it
- dejudicibus
- Knows some wx things
- Posts: 32
- Joined: Mon Dec 20, 2004 10:28 am
- Location: Rome, Italy (EU)
- Contact:
OK... At last I was able to compile and create my EXE file. It works. I am not sure what I did, that is, it is not yet clear for me what the manifest file is and why it is so critical to make it work, anyway... Now the question is, what I have to do to deliver my package to other people? My applications runs on every Windows system from 98SE+MSLU up to WinXP. What about the DLL? Should I ship it with my package?
Dr. Dario de Judicibus
Site: http://www.dejudicibus.it
Blog: http://lindipendente.splinder.com
Book: http://www.lalamanera.it
Site: http://www.dejudicibus.it
Blog: http://lindipendente.splinder.com
Book: http://www.lalamanera.it
-
- I live to help wx-kind
- Posts: 194
- Joined: Fri Feb 17, 2006 4:16 am
- Location: Singapore
- Contact:
For MSVC Express no debug C Runtime DLL (CRT) is provided. Rather msvcr80.dll is used as debug and as well as release dll.dejudicibus wrote:OK... At last I was able to compile and create my EXE file. It works. I am not sure what I did, that is, it is not yet clear for me what the manifest file is and why it is so critical to make it work, anyway... Now the question is, what I have to do to deliver my package to other people? My applications runs on every Windows system from 98SE+MSLU up to WinXP. What about the DLL? Should I ship it with my package?
Thus a manifest file is necessary to for any debug build of application to fool Windows so that it assumes it is loading msvcr80d.dll. If you make a quick search, you'll not find msvcr80d.dll in your system folder (You'll get it in some hidden directory).
I'm not sure about the licensing issue (Regarding redistribution). I'm not a Lawyer. But I think all updated WinXP pc will have it.
If you want avoid this issues, recompile your application with GCC and then redistribute it.
- dejudicibus
- Knows some wx things
- Posts: 32
- Joined: Mon Dec 20, 2004 10:28 am
- Location: Rome, Italy (EU)
- Contact:
Wait... Are you telling that now my application works ONLY on WinXP?????? It worked on any Windows, before... even 98SE!biplab wrote: I'm not sure about the licensing issue (Regarding redistribution). I'm not a Lawyer. But I think all updated WinXP pc will have it.
I just moved from bcc to Visual Studio. I do not want to change again! Why MS is making everything so complicated!!!!biplab wrote: If you want avoid this issues, recompile your application with GCC and then redistribute it.
Dr. Dario de Judicibus
Site: http://www.dejudicibus.it
Blog: http://lindipendente.splinder.com
Book: http://www.lalamanera.it
Site: http://www.dejudicibus.it
Blog: http://lindipendente.splinder.com
Book: http://www.lalamanera.it
- dejudicibus
- Knows some wx things
- Posts: 32
- Joined: Mon Dec 20, 2004 10:28 am
- Location: Rome, Italy (EU)
- Contact:
So, this trick is NOT necessary for Release? Which differences should apply to project?biplab wrote: Thus a manifest file is necessary to for any debug build of application to fool Windows so that it assumes it is loading msvcr80d.dll. If you make a quick search, you'll not find msvcr80d.dll in your system folder (You'll get it in some hidden directory).
Dr. Dario de Judicibus
Site: http://www.dejudicibus.it
Blog: http://lindipendente.splinder.com
Book: http://www.lalamanera.it
Site: http://www.dejudicibus.it
Blog: http://lindipendente.splinder.com
Book: http://www.lalamanera.it
-
- I live to help wx-kind
- Posts: 194
- Joined: Fri Feb 17, 2006 4:16 am
- Location: Singapore
- Contact:
Yes, this trick is not necessary for Release build. Just remove the manifest embedding part (Undo the steps I've written). Even if you keep them they won't pose any problem, though.dejudicibus wrote: So, this trick is NOT necessary for Release? Which differences should apply to project?
But the problem is with distribution of msvcr80.dll I'm not sure whether you can distribute it with your application legally.
Your application will run on all Windows Versions.
Hi,
I have a similar problem. In my case the manifest gets embedded but the debug executable won't start. When I look at it with Dependency Walker I see the error message:
Error: The Side-by-Side configuration information in "C:\projects\testapp\debug\TESTAPP.EXE.manifest" contains errors.
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.
The manifest looks like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.VC80.DebugCRT" version="8.0.50727.762" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="x86" publicKeyToken="6595b64144ccf1df" language="*"></assemblyIdentity>
</dependentAssembly>
</dependency>
</assembly>
Anyone have an idea what's going on? What's so frustrating is that I had it working before but now it suddenly has stopped working.
I have a similar problem. In my case the manifest gets embedded but the debug executable won't start. When I look at it with Dependency Walker I see the error message:
Error: The Side-by-Side configuration information in "C:\projects\testapp\debug\TESTAPP.EXE.manifest" contains errors.
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.
The manifest looks like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.VC80.DebugCRT" version="8.0.50727.762" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="x86" publicKeyToken="6595b64144ccf1df" language="*"></assemblyIdentity>
</dependentAssembly>
</dependency>
</assembly>
Anyone have an idea what's going on? What's so frustrating is that I had it working before but now it suddenly has stopped working.
Soon to be world famous
For the linker->Manifest File:
Generate Manifest: Yes
Manifest File: $(IntDir)\$(TargetFileName).intermediate.manifest
Allow Isolation: Yes
Manifest Tool->Input and Output:
Additional Manifest Files: $(IntDir)\$(TargetFileName).intermediate.manifest
Embed Manifest: Yes
Output Manifest File: $(IntDir)\$(TargetFileName)
Manifest Resource File: $(IntDir)\$(TargetFileName).embed.manifest.res
Generate Catalog Files: No
Dependency Information File: $(IntDir)\mt.dep
All settings not mentioned for these two pages are blank
Generate Manifest: Yes
Manifest File: $(IntDir)\$(TargetFileName).intermediate.manifest
Allow Isolation: Yes
Manifest Tool->Input and Output:
Additional Manifest Files: $(IntDir)\$(TargetFileName).intermediate.manifest
Embed Manifest: Yes
Output Manifest File: $(IntDir)\$(TargetFileName)
Manifest Resource File: $(IntDir)\$(TargetFileName).embed.manifest.res
Generate Catalog Files: No
Dependency Information File: $(IntDir)\mt.dep
All settings not mentioned for these two pages are blank
Soon to be world famous
-
- I live to help wx-kind
- Posts: 194
- Joined: Fri Feb 17, 2006 4:16 am
- Location: Singapore
- Contact:
Your settings are OK. But I think you are doing incremental linking.
You can't use incremental linking if you are embedding manifest in this manner.
Go to Linker > General > Enable Incremental Linking and set it to No (/INCREMENTAL:NO) and then do a full rebuild of your project.
This should fix the issue.
Regards,
Biplab
You can't use incremental linking if you are embedding manifest in this manner.
Go to Linker > General > Enable Incremental Linking and set it to No (/INCREMENTAL:NO) and then do a full rebuild of your project.
This should fix the issue.
Regards,
Biplab
Unfortunately, it didn't work. I already had INCREMENTAL linking set to NO.
When I look at the executable with Dependency Walker it still shows MSVCR80D missing. I don't know how to check but it looks like the manifest wasn't embedded in the executable. Are there other settings that affect the manifest embedding? Is there something wrong with my manifest?
Is there a tool to extract a manifest from an exectuable?
When I look at the executable with Dependency Walker it still shows MSVCR80D missing. I don't know how to check but it looks like the manifest wasn't embedded in the executable. Are there other settings that affect the manifest embedding? Is there something wrong with my manifest?
Is there a tool to extract a manifest from an exectuable?
Soon to be world famous