⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 subject_37132.htm

📁 vc
💻 HTM
字号:
<p>
序号:37132 发表者:ninekwll 发表日期:2003-04-22 10:08:14
<br>主题:编译时的链接错误
<br>内容:我的程序在链接时发生错误:<BR>LNK2005和LNK1169.<BR>上面显示的是多次定义,请高手解释一下!
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:neilgan 回复日期:2003-04-22 10:45:15
<br>内容:VC compiler will also show you what's the redefined symbol. Use "VC-&gt;Edit-&gt;Find in files..." to search for all the existences of this symbol, be sure that you defined it only once.<BR><BR>One reason for this error is that you declared a global variable in a .h file and include this file in several .cpp files. Don't declare global variables in .h files. Declare it in a .cpp file and use "extern VarType VarName;" in a .h file to export the variable.<BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -