VS 2005/Vs 2008 uses a new technology to generate an executable file. The executable file generated by this technology will be accompanied by a configuration file (manifest file )(. manifest suffix file) (which is essentially an XML document, you can open it in a text editor), and embed the list file into the EXE file after the link is complete (by default ). In the FAT32 file system, when the configuration file is processed, the configuration file cannot be updated (by default) when the incremental link is used. As a result, the configuration file fails to be embedded, so that the EXE file fails to run without the corresponding list file and the above error is prompted.
There are many solutions, as shown below:
1. Because this is a problem with the link to the dynamic Runtime Library, you can select the connection method generated by the Code as/MTD rather than/MDD, without using these DLL files to avoid the problem. This method has an obvious disadvantage: its applicability is limited and is not recommended.
NOTE: For the relationship between/MT/mtd md/MDD, see the link caused by different VC Runtime Library versions. A case study and summary of repeated definitions in the Lib static library; in addition, if/Mt or/MTD is used, the size of the generated file is basically 10 times the size of/MD or/MDD.
2. Since it is related to the FAT32 system, we can choose to develop it in the NTFS file system to avoid this problem. This method is the same as above. It is also a way to avoid the problem and is not recommended. (I personally recommend this method)
3. this method is still related to FAT32: in the project's "properties | configuration properties | Configuration tool | General (Project | game properties | configuration properties | C/C ++ | code generation | Runtime Library) select "yes" for "use FAT32 solution" ("no" by default), and regenerate the project to solve the problem. This method is the only solution to the problem, so that the inventory tool can be correctly updated. (This method is an official solution, which is convenient and recommended)
4. Since the problem occurs when the embedded inventory file is updated, the embedded inventory file cannot be updated due to FAT32, so we have two solutions:
(1) do not enable incremental links. Select "no" for "enable incremental link" in "properties | configuration properties | linker | General" of the project ". This method blocks the source of the problem. Each time an EXE file is generated, the inventory file is directly embedded, instead of deciding whether to update the inventory file based on the timestamp by default.
(2) The inventory file is not embedded. In "properties | configuration tools | input and output" of the project, select "no" for "embedded list ", therefore, an inventory file is generated along with the generation of the EXE file (by default, the file name is the full name of the EXE file plus ". manifest ") to avoid the possibility of failure to embed the inventory file. This configuration file is used when the program runs. Obviously, this method generates more external dependencies for executable programs, which is not recommended.
In addition, there is another method that cannot be called a method: manually delete each build *. ILK file (incremental link file) (of course, you can write the DELETE command in the project property to make it run automatically), this method is not recommended.
Finally, let's summarize:
1. this problem occurs only under certain conditions: compilation in the FAT32 file system, default settings (incremental mode, FAT32 solution not enabled, embedded inventory file), not the first generation into an executable file (that is, when the incremental connection, update the inventory file ). (Note)
2. solution 1 and 4.1 are convenient and practical, and are recommended for use.
PS: I personally think the best way to solve this problem is to use vc2005/vc2008 for development on the NTFS file system (that is, 2nd methods ). Most of the current software can run normally in the NTFS file system (even dos tools can run well on the NTFS file system ), why do we have to hold the fat/FAT32 file system?
In addition, pay attention to a concept problem. "msvcp90d cannot be found under vc2008. dll "is a development issue. It is caused by the bug of the Windows File System (FAT32 bug) that causes the program compiled by vc2005/vc2008 to fail to run normally. Source http://alone-dancer-sohu-com.javaeye.com/blog/418743