链接错误!郁闷!
------ Build started: Project: PhPlayer, Configuration: Release Win32 ------
Linking...
LINK : warning LNK4075: ignoring '/EDITANDCONTINUE ' due to '/OPT:ICF ' specification
atlsd.lib(Externs.obj) : error LNK2005: "char const * const g_pszKernelObjFmt " (?g_pszKernelObjFmt@@3PBDB) already defined in atls.lib(Externs.obj)
atlsd.lib(Externs.obj) : error LNK2005: "char const * const g_pszAllocFileMapName " (?g_pszAllocFileMapName@@3PBDB) already defined in atls.lib(Externs.obj)
atlsd.lib(Externs.obj) : error LNK2005: "char const * const g_pszUpdateEventName " (?g_pszUpdateEventName@@3PBDB) already defined in atls.lib(Externs.obj)
atlsd.lib(Externs.obj) : error LNK2005: "class CAtlAllocator g_Allocator " (?g_Allocator@@3VCAtlAllocator@@A) already defined in atls.lib(Externs.obj)
atlsd.lib(Externs.obj) : warning LNK4006: "char const * const g_pszKernelObjFmt " (?g_pszKernelObjFmt@@3PBDB) already defined in atls.lib(Externs.obj); second definition ignored
atlsd.lib(Externs.obj) : warning LNK4006: "char const * const g_pszAllocFileMapName " (?g_pszAllocFileMapName@@3PBDB) already defined in atls.lib(Externs.obj); second definition ignored
atlsd.lib(Externs.obj) : warning LNK4006: "char const * const g_pszUpdateEventName " (?g_pszUpdateEventName@@3PBDB) already defined in atls.lib(Externs.obj); second definition ignored
atlsd.lib(Externs.obj) : warning LNK4006: "class CAtlAllocator g_Allocator " (?g_Allocator@@3VCAtlAllocator@@A) already defined in atls.lib(Externs.obj); second definition ignored
Creating library ../../../../Output/PhPlayer.lib and object ../../../../Output/PhPlayer.exp
LINK : warning LNK4098: defaultlib 'MSVCRTD ' conflicts with use of other libs; use /NODEFAULTLIB:library
msvcrt.lib(cinitexe.obj) : warning LNK4098: defaultlib 'libcmt.lib ' conflicts with use of other libs; use /NODEFAULTLIB:library
strmbase.lib(dllentry.obj) : error LNK2019: unresolved external symbol "class CFactoryTemplate * g_Templates " (?g_Templates@@3PAVCFactoryTemplate@@A) referenced in function _DllGetClassObject@12
strmbase.lib(dllentry.obj) : error LNK2019: unresolved external symbol "int g_cTemplates " (?g_cTemplates@@3HA) referenced in function _DllGetClassObject@12
../../../../Output/PhPlayer.ocx : fatal error LNK1120: 2 unresolved externals
Build log was saved at "file://h:\PhNet\Code\wifo\vs2005\Wifo\PhPlayer\Release\BuildLog.htm "
PhPlayer - 7 error(s), 7 warning(s)
------ Build started: Project: PhPlayer, Configuration: Debug Win32 ------
Linking...
Creating library ../../../../Output/PhPlayer.lib and object ../../../../Output/PhPlayer.exp
LINK : warning LNK4098: defaultlib 'MSVCRT ' conflicts with use of other libs; use /NODEFAULTLIB:library
msvcrtd.lib(cinitexe.obj) : warning LNK4098: defaultlib 'libcmt.lib ' conflicts with use of other libs; use /NODEFAULTLIB:library
msvcrtd.lib(cinitexe.obj) : warning LNK4098: defaultlib 'libcmtd.lib ' conflicts with use of other libs; use /NODEFAULTLIB:library
strmbasd.lib(dllentry.obj) : error LNK2001: unresolved external symbol "class CFactoryTemplate * g_Templates " (?g_Templates@@3PAVCFactoryTemplate@@A)
strmbasd.lib(dllentry.obj) : error LNK2001: unresolved external symbol "int g_cTemplates " (?g_cTemplates@@3HA)
../../../../Output/PhPlayer.ocx : fatal error LNK1120: 2 unresolved externals
Build log was saved at "file://h:\PhNet\Code\wifo\vs2005\Wifo\PhPlayer\Debug\BuildLog.htm "
PhPlayer - 3 error(s), 3 warning(s)
---------------------- Done ----------------------
Build: 0 succeeded, 2 failed, 0 skipped
[解决办法]
error LNK2005: "char const * const g_pszKernelObjFmt " (?g_pszKernelObjFmt@@3PBDB) already defined in atls.lib(Externs.obj)
检查Tools-> optionr里文件夹选项下,include files和library files的文件包含顺序。