Problem: Since log4cpp-0.3.5RC3 only provides VC6 engineering files, it is necessary to convert after the VS2005 is opened. But after the conversion, it cannot be compiled correctly, and an error occurs when the Custom Build Step is prompted.
Analysis: Because log4cpp is generated when generating NTEVENTLOGAPPENDER.DLL, you need to connect NTEVENTLOGCATEGORIES.MC files. So, the project sets a custom build step to generate NTEVENTLOGAPPENDER.DLL. But when the project file of VC6 is converted, these steps are not properly converted. Thereby the above problem occurs.
Workaround: Return the Custom Build Step item.
Among them, CommandLine fills in the following:
IF not exist $ (outdir) MD $ (outdir) "mc.exe" -h $ (outdir) -r $ (outdir) NTEVENTLOGCATEGORIES.MC "rc.exe" -r -fo $ (Outdir) / $ (InputName) .res $ (Projectdir) / $ (InputName) .rc "link.exe" / machine: ix86 -dll -noentry -out: $ (outdir) /nteventlogappender.dll $ (outdir) / $ (InputName) .res
Outputs fill in: $ (outdir) /nteventlogappender.dll
Scope of application: log4cpp project, DEBUG and RELEASE configuration for log4cppdll projects. At the same time, this method is suitable for VS2003 (VC7.1).