LINKER ERROR 1215 [英] LINKER ERROR 1215

查看:84
本文介绍了LINKER ERROR 1215的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于一些共鸣,我的代码产生了一个LNK1215错误,建议'我重新安装VS C ++。所以我做了。这没有解决问题。 weid部分

似乎是由我的一个CPP文件引起的,但不确定如何。它编译了

就好了。然后我做了一个简单的更改并重新编译,并得到1215

错误。之后,我必须带回旧版本的代码才能使

再次工作(不好玩)......


这似乎是一个真正的链接错误,不是我的原因。

这是链接器的一些已知问题,是否有解决方案?


提前谢谢! :)

For some reson my code is generating a LNK1215 error, which ''suggests'' I
re-install VS C++. So I did. which did NOT solve the problem. The weid part
is it seems to be caused by my one CPP file, but not sure how. It compiled
just fine. Then I made a simple change and re-compiled, and got the 1215
error. After that I have to bring back in an old version of the code to make
it work again (not fun)...

This seems like a REAL LINKER error, not my cause.

Is this some known problem with the linker, and is there a solution?

Thanks in advance! : )

推荐答案

" Peter Oliphant" < PO ******* @ RoundTripInc.com>在消息中写道

news:uF ************** @ TK2MSFTNGP09.phx.gbl ...
"Peter Oliphant" <po*******@RoundTripInc.com> wrote in message
news:uF**************@TK2MSFTNGP09.phx.gbl...
对于一些共鸣我的代码正在生成LNK1215错误,建议'我重新安装VS C ++。所以我做了。这没有解决问题。 weid
部分似乎是由我的一个CPP文件引起的,但不确定如何。它编译得很好。然后我做了一个简单的改动并重新编译,并得到了1215错误。之后我必须带回旧版本的
代码才能让它再次运行(不好玩)......

这似乎是一个真正的LINKER错误,而不是我的原因。

这是链接器的一些已知问题,是否有解决方案?
For some reson my code is generating a LNK1215 error, which ''suggests'' I
re-install VS C++. So I did. which did NOT solve the problem. The weid
part is it seems to be caused by my one CPP file, but not sure how. It
compiled just fine. Then I made a simple change and re-compiled, and got
the 1215 error. After that I have to bring back in an old version of the
code to make it work again (not fun)...

This seems like a REAL LINKER error, not my cause.

Is this some known problem with the linker, and is there a solution?




不,它不是链接器问题,这是你的项目真正的问题。

建议重新安装VC ++是奇怪的 - 我不记得听说过这个问题。


据我所知,这个错误的主要原因是违反了C ++中的一个定义规则。换句话说,你有一个东西(一个类,对于

例子),它有多个单一的定义。


生成这个的简单方法错误是在同一类型上混合类和结构关键字

。在VC ++下,导致两种不同的类型与

不同的装饰名称,如果你生成托管代码,则会导致此错误。这可能是你的问题吗?


-cd



No, it''s not a linker problem, it''s a real problem with your project. The
advise to reinstall VC++ is odd - I don''t recall hearing of that ever fixing
the problem.

From what I understand, the main cause of this error is violations of the
One Definition Rule in C++. In other words, you have a thing (a class, for
example), that has more than a single definition.

A simple way to produce this error is to mix the class and struct keywords
on the same type. Under VC++ that results in two different types with
different decorated names, and will result in this error if you''re
generating managed code. Could that be your problem?

-cd



好的,把它归结到哪里如果我添加一个特定的行它会得到链接器

错误,但是如果我将它注释掉它就会编译。这条线本身不会导致错误,这就是它的存在(意思是代码很好,实际上这行是用来工作的b $ b)。 br />

也许我必须实际删除VS.NET 2003并从头开始重新安装?

讨厌这样做并发现这不是问题(需要1.5小时

才能安装)...


我应该和MS联系吗?这绝对是他们的链接器的一个问题...


我也会去看看是否有一个我不知道的服务包...... :)


帮助!我无法继续使用此链接器错误进行编程...


[== P ==]


" Peter Oliphant" ; < PO ******* @ RoundTripInc.com>在消息中写道

news:uF ************** @ TK2MSFTNGP09.phx.gbl ...
OK, got it down to where if I add a particular line it gets the linker
error, but if I comment it out it compiles. The line itself does not cause
the error, it''s its existence (meaning the code is fine, in fact, this line
use to work before).

Maybe I have to actually REMOVE VS.NET 2003 and re-install from scratch?
Hate to do this and find out that''s not the problem (it takes like 1.5 HOURS
to install)...

Should I contact MS? This is definitely a problem with THEIR linker...

I''ll also go look to see if there is a service pack I don''t know about... :)

HELP!!! I can''t continue to program with this linker error...

[==P==]

"Peter Oliphant" <po*******@RoundTripInc.com> wrote in message
news:uF**************@TK2MSFTNGP09.phx.gbl...
对于一些共鸣我的代码正在生成LNK1215错误,建议'我重新安装VS C ++。所以我做了。这没有解决问题。 weid
部分似乎是由我的一个CPP文件引起的,但不确定如何。它编译得很好。然后我做了一个简单的改动并重新编译,并得到了1215错误。之后我必须带回旧版本的
代码才能让它再次运行(不好玩)......

这似乎是一个真正的LINKER错误,而不是我的原因。

这是链接器的一些已知问题,是否有解决方案?

提前致谢! :)
For some reson my code is generating a LNK1215 error, which ''suggests'' I
re-install VS C++. So I did. which did NOT solve the problem. The weid
part is it seems to be caused by my one CPP file, but not sure how. It
compiled just fine. Then I made a simple change and re-compiled, and got
the 1215 error. After that I have to bring back in an old version of the
code to make it work again (not fun)...

This seems like a REAL LINKER error, not my cause.

Is this some known problem with the linker, and is there a solution?

Thanks in advance! : )



>产生此错误的一种简单方法是将类和结构关键字
> A simple way to produce this error is to mix the class and struct keywords
混合在同一类型上。在VC ++下,导致两种不同的类型具有不同的装饰名称,如果您生成托管代码,将导致此错误。这可能是你的问题吗?


嗯。不确定。如果是,那是因为System :: Math类有这个

问题。我这样说是因为如果我从我的代码中删除以下行它

编译就好了:


double rad = Math :: Atan2(1,2) ;


有了它我得到了问题(但并非总是如此,我的源代码的一些状态

允许编译即使使用这一行,这也很奇怪)。所以,如果它违反了一个定义规则,那么它的数学算法就是这样做的,那就是
(恕我直言)! :)


[== P ==]


" Carl Daniel [VC ++ MVP]" < cp ***************************** @ mvps.org.nospam>

写道消息新闻:ur ************** @ TK2MSFTNGP12.phx.gbl ..." Peter Oliphant" < PO ******* @ RoundTripInc.com>在消息中写道
新闻:uF ************** @ TK2MSFTNGP09.phx.gbl ...
on the same type. Under VC++ that results in two different types with
different decorated names, and will result in this error if you''re
generating managed code. Could that be your problem?
Hmmm. Not sure. If it is, it''s because the System::Math class has this
problem. I say this because if I remove the following line from my code it
compiles just fine:

double rad = Math::Atan2( 1, 2 ) ;

With it I get the problem (but not always, some states of my source code
allow compiling even with this line, which is odd as well). So, if it''s a
violation of the One Definition Rule then its the Math calss that''s doing it
(IMHO)! :)

[==P==]

"Carl Daniel [VC++ MVP]" <cp*****************************@mvps.org.nospam >
wrote in message news:ur**************@TK2MSFTNGP12.phx.gbl... "Peter Oliphant" <po*******@RoundTripInc.com> wrote in message
news:uF**************@TK2MSFTNGP09.phx.gbl...
对于一些共鸣,我的代码生成一个LNK1215错误,建议'我重新安装VS C ++。所以我做了。这没有解决问题。 weid
部分似乎是由我的一个CPP文件引起的,但不确定如何。它编译得很好。然后我做了一个简单的改动并重新编译,并得到了1215错误。之后我必须带回旧版本的
代码才能让它再次运行(不好玩)......

这似乎是一个真正的LINKER错误,而不是我的原因。

这是链接器的一些已知问题,是否有解决方案?
For some reson my code is generating a LNK1215 error, which ''suggests'' I
re-install VS C++. So I did. which did NOT solve the problem. The weid
part is it seems to be caused by my one CPP file, but not sure how. It
compiled just fine. Then I made a simple change and re-compiled, and got
the 1215 error. After that I have to bring back in an old version of the
code to make it work again (not fun)...

This seems like a REAL LINKER error, not my cause.

Is this some known problem with the linker, and is there a solution?



不,它不是链接器问题,它是一个你的项目真正的问题。
建议重新安装VC ++是奇怪的 - 我不记得听到过这个问题。

根据我的理解,这个错误的主要原因是违反了C ++中的一个定义规则。换句话说,你有一个东西(例如,一个类),它有一个以上的定义。

产生这个错误的一个简单方法是混合类和结构关键字
在同一类型上。在VC ++下,导致两种不同的类型具有不同的装饰名称,如果您生成托管代码,将导致此错误。这可能是你的问题吗?

-cd



No, it''s not a linker problem, it''s a real problem with your project. The
advise to reinstall VC++ is odd - I don''t recall hearing of that ever
fixing the problem.

From what I understand, the main cause of this error is violations of the
One Definition Rule in C++. In other words, you have a thing (a class,
for example), that has more than a single definition.

A simple way to produce this error is to mix the class and struct keywords
on the same type. Under VC++ that results in two different types with
different decorated names, and will result in this error if you''re
generating managed code. Could that be your problem?

-cd



这篇关于LINKER ERROR 1215的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆