CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2004
    Posts
    7

    compile error on wrong line

    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

  2. #2
    Join Date
    Apr 2004
    Posts
    7
    Problem solved by

    Hendrik Schober and Ronald Laeremans [MSFT]
    (In: microsoft.public.dotnet.languages.vc)

    I've seen this happening when the code has mixed line endings.
    i.e. /r versus /n versus /r/n versus /n/r at the end of your lines

  3. #3
    Join Date
    Jun 2002
    Location
    Bozeman, MT
    Posts
    8

    Re: compile error on wrong line

    Sam problem

  4. #4
    Join Date
    Jun 2002
    Location
    Bozeman, MT
    Posts
    8

    Re: compile error on wrong line

    bobfromb is exactly right... I had ftp'd the file from a unix server in binary mode and had a few \r\n's in the code. I used editplus to remove all of the \r characters, rebuilt, and now my code debugger uses the correct line numbers. thanks bobfromb -- good call.

  5. #5
    Join Date
    Mar 2004
    Location
    (Upper-) Austria
    Posts
    2,899

    Re: compile error on wrong line

    [ Moved Thread ]
    I am not offering technical guidiance via email or IM
    Come on share your photo with us! CG members photo album!
    Use the Code Tags!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured