在错误的行上编译错误 [英] compile error on wrong line

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

问题描述

你好,


我使用的是Microsoft Visual C ++ .NET(版本7.1.3088)

当我得到编译时,有时候(有大代码?)错误并单击错误,光标放在错误的代码旁边。错误消息中的行号和光标的行号匹配,但真正的错误在其他地方。

调试代码时我得到的相同,光标所在的代码片段是没有办法的实际调试的代码。

这非常令人沮丧!


我重新编译了整个项目,但这没有帮助!


有什么建议吗?


提前完成

Hello,

I use Microsoft Visual C++ .NET (version 7.1.3088)
Sometimes (with big codes?) when I get a compile error and click on the error, the cursor is placed next to the wrong piece of code. The line number in the error message and that of the cursor do match but the real error is somewhere else.
The same I get when debugging my code, the piece of code the cursor is at is no way the code that is actually debugged.
This is very frustating!

I re-compiled the complete project but this does not help!

Any suggestions?

Thanx in advance

推荐答案



" bob" <一个******* @ discussions.microsoft.com>在留言中写道

新闻:E4 ********************************** @ microsof t.com ...

"bob" <an*******@discussions.microsoft.com> wrote in message
news:E4**********************************@microsof t.com...
您好,

我使用的是Microsoft Visual C ++ .NET(版本7.1.3088)
有时(使用大代码?)当我得到编译错误并单击
错误,光标放在错误的代码旁边。错误消息中的行

数字与光标的行匹配,但真正的

错误在其他地方。我在调试代码时得到的结果是,光标位于
的代码段是实际调试的代码。这非常令人沮丧!

我重新编译完整的项目,但这没有帮助!

有任何建议吗?

提前完成
Hello,

I use Microsoft Visual C++ .NET (version 7.1.3088)
Sometimes (with big codes?) when I get a compile error and click on the error, the cursor is placed next to the wrong piece of code. The line
number in the error message and that of the cursor do match but the real
error is somewhere else. The same I get when debugging my code, the piece of code the cursor is at is no way the code that is actually debugged. This is very frustating!

I re-compiled the complete project but this does not help!

Any suggestions?

Thanx in advance




请原谅我,如果这些似乎是微不足道的问题,但是你在谈论

错误识别一两行,还是比那更远?

大代码有多大,这种情况下代码类型是否有任何模式?

-

Peter [MVP学术]



Forgive me if these seem trivial questions, but are you talking about
misidentification a line or two away, or farther off than that? How big is
"big code", and is there any pattern to the type of code where this happens?
--
Peter [MVP Academic]


bob< an ******* @ discussion.microsoft.com>写道:
bob <an*******@discussions.microsoft.com> wrote:
你好,

我使用的是Microsoft Visual C ++ .NET(版本7.1.3088)
当我遇到编译错误时(有大代码?)并单击错误,将光标放在错误的代码旁边。错误消息中的行号与游标的行号匹配,但实际错误位于其他位置。在调试我的代码时,我得到了同样的结果,光标所在的代码片段实际上是调试的代码。
这非常令人沮丧!

我是编译完整的项目,但这没有帮助!

有什么建议吗?


当代码

有混合行结尾时,我已经看到了这种情况。

提前使用Thanx
Hello,

I use Microsoft Visual C++ .NET (version 7.1.3088)
Sometimes (with big codes?) when I get a compile error and click on the error, the cursor is placed next to the wrong piece of
code. The line number in the error message and that of the cursor do match but the real error is somewhere else. The same I get
when debugging my code, the piece of code the cursor is at is no way the code that is actually debugged.
This is very frustating!

I re-compiled the complete project but this does not help!

Any suggestions?
I''ve seen this happening when the code
has mixed line endings.
Thanx in advance



Schobi


-
Sp ** **** @ gmx.de 永远不会被阅读

我是Schobi at suespammers dot org


有时编译器是如此比人更合理。

Scott Meyers


Schobi

--
Sp******@gmx.de is never read
I''m Schobi at suespammers dot org

"Sometimes compilers are so much more reasonable than people."
Scott Meyers


Peter


代码由3个库和1个控制台应用程序,并有几万行代码

最近,我添加了一些新的* .h文件。错误(错误的编译行错误和错误的调试行)只发生在代码的新部分中

编译错误通常是5到10行错误

调试时,整个新代码被省略了


根据Schobi的原因可能是当代码混合行结尾时,我已经看到这种情况发生了。虽然我不知道混合线的结尾是什么


Bo

Peter

The code consists of 3 libs and 1 console application and has several ten thousand lines of code
Recently, I added some new *.h files. The errors (wrong compile line error and wrong debug line) only happen in the new part of the code
The compile error is typically 5 to 10 lines wrong
When debugging, whole shunks of new code are omitted

According to Schobi a reason could be "I''ve seen this happening when the code has mixed line endings." although I''ve no idea what mixed line endings are

Bo


这篇关于在错误的行上编译错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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