Announcement

Collapse
No announcement yet.

disabling a certain warning in Visual C++

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • disabling a certain warning in Visual C++

    Hello,

    I'm currently working on a program in Visual C++, but there is a warning that is driving me crazy. The warning does not come from my own files, but from the standard include files (xtree) :
    -
    Compiler Warning (level 1) C4786
    'identifier' : identifier was truncated to 'number' characters in the debug information

    The identifier string exceeded the maximum allowable length and was truncated.

    The debugger cannot debug code with symbols longer than 255 characters. In the debugger, you cannot view, evaluate, update, or watch the truncated symbols.
    -

    The problem is that I'm currently having 85 of these warnings, which makes it hard to look for other warnings or errors.
    I know the #pragma warning(disable:4786) option, but I can only use that in my own files (if no other option, I'll put it in the xtree file, but I'd prefer to keep these files "unmanipulated").
    Is there a way of telling the compiler that (for this project) it should *never* give out this warning ?


    Jörg
    pixar
    Dream as if you'll live forever. Live as if you'll die tomorrow. (James Dean)

  • #2
    Huh.

    I always thought that C4786 was supposed to be off by default.

    You might be able to use the /FI (Name Forced Include File) command line switch in your project to do what you want.

    Good luck.

    Comment


    • #3
      Perhaps a bit late to reply, but the /FI did the trick !
      (now I can have my warnings enabled, but not have the 589 generated by the Microsoft-headers displayed)

      Thanks !!!


      Jörg
      pixar
      Dream as if you'll live forever. Live as if you'll die tomorrow. (James Dean)

      Comment


      • #4
        Glad that it worked for you!

        Comment

        Working...
        X