解释与模板相关的编译器消息

时间:2019-05-03 23:20:30

标签: c++ visual-c++ visual-studio-2017

我正在Visual Studio 2017下编译一个非常老的代码库。虽然可以编译代码,但是编译器会发出以下消息,但我不知道如何解释。

编辑:这是不变的编译器输出

1>------ Build started: Project: Obsidian.DSP.DirectShow, Configuration: Debug x64 ------
1>clock.cpp
1>parsing with MACROS
1>s:\library\obsidian.dsp.directshow\mpeg2demux\mp2demux\clock.cpp(962): warning C4101: 'rtDelta': unreferenced local variable
1>s:\library\obsidian.dsp.directshow\mpeg2demux\mp2demux\clock.cpp(1277): warning C4101: 'rtGetTime': unreferenced local variable
1>s:\library\obsidian.dsp.directshow\mpeg2demux\mp2demux\clock.cpp(286): warning C4101: 'pHead': unreferenced local variable
1>s:\library\obsidian.dsp.directshow\mpeg2demux\mp2demux\clock.cpp(282): note: while compiling class template member function 'void CTClockSubordinate<LONGLONG,LONGLONG>::OnMasterTime(MasterClock)'
1>        with
1>        [
1>            MasterClock=LONGLONG
1>        ]
1>s:\library\obsidian.dsp.directshow\mpeg2demux\mp2demux\clock.cpp(1566): note: see reference to function template instantiation 'void CTClockSubordinate<LONGLONG,LONGLONG>::OnMasterTime(MasterClock)' being compiled
1>        with
1>        [
1>            MasterClock=LONGLONG
1>        ]
1>s:\library\obsidian.dsp.directshow\mpeg2demux\mp2demux\clock.h(410): note: see reference to class template instantiation 'CTClockSubordinate<LONGLONG,LONGLONG>' being compiled
1>AssemblyInfo.obj : /DEBUG:FASTLINK is not supported when managed code is present; restarting link with /DEBUG:FULL
1>AssemblyInfo.obj : MSIL module encountered; incremental linking is disabled for MSIL; performing full link
1>Obsidian.DSP.DirectShow.vcxproj -> S:\Obsidian.Topaz\x64\Debug\Obsidian.DSP.DirectShow.dll
1>ALINK : warning AL1073: Referenced assembly 'mscorlib.dll' targets a different processor
1>Done building project "Obsidian.DSP.DirectShow.vcxproj".
========== Build: 1 succeeded, 0 failed, 16 up-to-date, 0 skipped ==========

就是这样,没有更多信息。是某种警告吗?我应该修改代码吗?

这是一个如何定义其中一个模板的示例(在.cpp文件下)

template <class HostClock,class MasterClock>
void
CTClockSubordinate <HostClock, MasterClock>::OnMasterTime (
    IN  MasterClock   MasterTime
    )
{
   ...
}

0 个答案:

没有答案