473,406 Members | 2,336 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

compile error on wrong line

bob
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
Nov 17 '05 #1
10 1624

"bob" <an*******@discussions.microsoft.com> wrote in message
news:E4**********************************@microsof t.com...
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


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]
Nov 17 '05 #2
bob <an*******@discussions.microsoft.com> wrote:
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 is never read
I'm Schobi at suespammers dot org

"Sometimes compilers are so much more reasonable than people."
Scott Meyers
Nov 17 '05 #3
bob
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

Nov 17 '05 #4
I experience the same problem but with much "shorter" code (2 C files of about 400 lines each

What do you mean by "line endings

Nov 17 '05 #5
/r versus /n versus /r/n versus /n/r at the end of your lines of source.

Ronald Laeremans
Visual C++ team

"Ruvi Biezuner" <an*******@discussions.microsoft.com> wrote in message
news:65**********************************@microsof t.com...
I experience the same problem but with much "shorter" code (2 C files of about 400 lines each)
What do you mean by "line endings"

Nov 17 '05 #6
bob <an*******@discussions.microsoft.com> wrote:
[...]
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?
Mac/Win/Unix
Bob

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
Nov 17 '05 #7
Thanks,
It solved the proble

Nov 17 '05 #8
Bob,

I'v got the same problem

How did you correct the line endings?
Nov 17 '05 #9
Stéphane <an*******@discussions.microsoft.com> wrote:
Bob,

I'v got the same problem.

How did you correct the line endings?

I used an in-house tool.
However, I believe the IDe will correct
line endings when you save a file.

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
Nov 17 '05 #10
Stéphane <an*******@discussions.microsoft.com> wrote:
[...]
What I don't understand is how the problem first occurred.
Is it a cut and paste problem? I will continue to investigate!
It usually happens when you copy code between
platforms.
Thank you for your help.

Steph

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
Nov 17 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: banjo123 | last post by:
Dear java.help: I just started learning java and was trying to compile some java sourc from the Javascript World Submission webpage. I know I have loaded m JDK successfully since I can compile...
1
by: Stanley | last post by:
I am working with Exceptions and have found a bit of a problem for me. Using the code below in Debug I get the info I want which is basically: -Line of error -Column of error -Method where error...
5
by: xuatla | last post by:
Hi, I encountered the following compile error of c++ and hope to get your help. test2.cpp: In member function `CTest CTest::operator+=(CTest&)': test2.cpp:79: error: no match for 'operator='...
5
by: Carmine Cairo | last post by:
Hi, I'm working on a project and today I've note a little problem during the compile fase. Here a little piece of code: // 1st version welldone = 0; size = p->getSize(); backbone = new...
5
by: Brice Prunier | last post by:
Here under 4 schemas i'm working with ( it may be long: sorry...) The context is the following : Resident.xsd imports Person.xsd and includes Common.xsd ( anonimous schema: no TargetNamespace )...
10
by: Jean-David Beyer | last post by:
I have some programs running on Red Hat Linux 7.3 working with IBM DB2 V6.1 (with all the FixPacks) on my old machine. I have just installed IBM DB2 V8.1 on this (new) machine running Red Hat...
4
by: Siegfried Heintze | last post by:
It appears that the automatic compilation feature of ASP.NET causes problems with a security package called Black Ice that my hosting service is using. I'm hoping that if I manually compile my...
4
by: twelvetone | last post by:
Can anyone explain why this file won't compile? The errors I'm getting in VS.Net 2003 are below. ============================ c:\sri\sw\scs\SCS\src\TaskPlans\main.cpp(24): error C3861: 'str':...
4
by: Martijn de Munnik | last post by:
Hi, I want to compile python on my solaris 10 system (amd 64 bit). I did the following: ../configure --prefix=/opt/64/python make which resulted in this error:
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.