最近在写一个压缩算法的东东,总是出现一个如下信息的警告(debug下的警告,在Release下是错误):
Linking...
LINK : warning LNK4075: ignoring /INCREMENTAL due to /FORCE specification
Dictionary.obj : warning LNK4006: "void __cdecl setProgress(class CTextProgressCtrl &,double,double)" (?setProgress@@YAXAAVCTextProgressCtrl@@NN@Z) already defined in BitFileIO.obj; second definition ignored
L_Tool.obj : warning LNK4006: "void __cdecl setProgress(class CTextProgressCtrl &,double,double)" (?setProgress@@YAXAAVCTextProgressCtrl@@NN@Z) already defined in BitFileIO.obj; second definition ignored
L_ToolDlg.obj : warning LNK4006: "void __cdecl setProgress(class CTextProgressCtrl &,double,double)" (?setProgress@@YAXAAVCTextProgressCtrl@@NN@Z) already defined in BitFileIO.obj; second definition ignored
LCompression.obj : warning LNK4006: "void __cdecl setProgress(class CTextProgressCtrl &,double,double)" (?setProgress@@YAXAAVCTextProgressCtrl@@NN@Z) already defined in BitFileIO.obj; second definition ignored
Debug/L_Tool.exe : warning LNK4088: image being generated due to /FORCE option; image may not run
Creating browse info file...
L_Tool.exe - 0 error(s), 6 warning(s)
在网上看了N多介绍的,都没有用。最后发现有一个函数,我定义为是全局函数,可能是被重定义了吧。因为在有
好几个文件都包括了全局函数所在的头文件。将全局函数只放在使用它的文件里后,一切问题都解决了,在debug模式和release模式下都没有错误。
//刚开始写Blog,与大家共学习。