Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > How can I fix the warning C4786 'identifier' : identifier wastruncated to 'number' characters in the debug information...?

Reply
Thread Tools

How can I fix the warning C4786 'identifier' : identifier wastruncated to 'number' characters in the debug information...?

 
 
babakandme@yahoo.com
Guest
Posts: n/a
 
      12-11-2007
I have a MyIOManager Object.
In this object I have a ""typedef map<_TCHAR, Command *> cmdMap""

I also have a CommandManager & Command Objects.


// MyIOManager class
....
typedef map<_TCHAR, Command *> commandMap;
....
class MyIOManager
{
....
commandMap cmdMap;
CommandManager * cmdManager;
Command * cmd
....
}

MyIOManager::StartIO()
{
....
cmd = cmdManager->CatchCommand( cmdMap );
....
}

// CommandManager class
Command * CommandManager::CatchCommand( ... )
{
....
// return a Command *...
}



But I get too many warnings like the following:
What is wrong?
How can I fix it?

I checked the MSDN Library... there is written that I should shorten
the Identifier names..., But I don't understand, I don't have at all
long name more than 255 characters...

Thanks...



d:\installingfolder\microsoft visual studio\vc98\include\xtree(200) :
warning C4786: '?rbegin@?$_Tree@DU?$pair@$$CBDPCommand@@@std@@U_K fn@?
$map@DPCommand@@U?$less@D@std@@V?$allocator@PComma nd@@@3@@2@U?
$less@D@2@V?$allocator@PCommand@@@2@@std
@@QAE?AV?$reverse_bidirectional_iterator@Viterator @?$_Tree@DU?$pair@$
$CBDPCommand@@@std@@U_Kfn@?$map@DPCommand@@U?$less @D@std@@V?
$allocator@PCommand@@@3@@2@U?$less@D@2@V?
$allocator@PCommand@@@2@@std@@U?$pair@$$CBDPComman d@@@3@AAU43@PAU43@H
@2@XZ' :


identifier was truncated to '255' characters in the browser
information



d:\installingfolder\microsoft visual studio\vc98\include
\map(46) : see reference to class template instantiation
'std::_Tree<char,struct std:air<char const ,class Command *>,struct
std::map<char,class Command *,struct std::less<char>,class
std::allocator<class Command *> >::_Kfn,struct std::less<char>,class
std::allocator<class Command *> >' being compiled
d:\documents\myprojects\commandmanager.h(31) : see reference
to class template instantiation 'std::map<char,class Command *,struct
std::less<char>,class std::allocator<class Command *> >' being compiled
 
Reply With Quote
 
 
 
 
Abhishek Padmanabh
Guest
Posts: n/a
 
      12-11-2007
On Dec 11, 8:27 pm, (E-Mail Removed) wrote:
> I have a MyIOManager Object.
> In this object I have a ""typedef map<_TCHAR, Command *> cmdMap""
>
> I also have a CommandManager & Command Objects.
>
> // MyIOManager class
> ...
> typedef map<_TCHAR, Command *> commandMap;
> ...
> class MyIOManager
> {
> ...
> commandMap cmdMap;
> CommandManager * cmdManager;
> Command * cmd
> ...
>
> }
>
> MyIOManager::StartIO()
> {
> ...
> cmd = cmdManager->CatchCommand( cmdMap );
> ...
>
> }
>
> // CommandManager class
> Command * CommandManager::CatchCommand( ... )
> {
> ...
> // return a Command *...
>
> }
>
> But I get too many warnings like the following:
> What is wrong?
> How can I fix it?
>
> I checked the MSDN Library... there is written that I should shorten
> the Identifier names..., But I don't understand, I don't have at all
> long name more than 255 characters...
>
> Thanks...
>
> d:\installingfolder\microsoft visual studio\vc98\include\xtree(200) :
> warning C4786: '?rbegin@?$_Tree@DU?$pair@$$CBDPCommand@@@std@@U_K fn@?
> $map@DPCommand@@U?$less@D@std@@V?$allocator@PComma nd@@@3@@2@U?
> $less@D@2@V?$allocator@PCommand@@@2@@std
> @@QAE?AV?$reverse_bidirectional_iterator@Viterator @?$_Tree@DU?$pair@$
> $CBDPCommand@@@std@@U_Kfn@?$map@DPCommand@@U?$less @D@std@@V?
> $allocator@PCommand@@@3@@2@U?$less@D@2@V?
> $allocator@PCommand@@@2@@std@@U?$pair@$$CBDPComman d@@@3@AAU43@PAU43@H
> @2@XZ' :
>
> identifier was truncated to '255' characters in the browser
> information
>
> d:\installingfolder\microsoft visual studio\vc98\include
> \map(46) : see reference to class template instantiation
> 'std::_Tree<char,struct std:air<char const ,class Command *>,struct
> std::map<char,class Command *,struct std::less<char>,class
> std::allocator<class Command *> >::_Kfn,struct std::less<char>,class
> std::allocator<class Command *> >' being compiled
> d:\documents\myprojects\commandmanager.h(31) : see reference
> to class template instantiation 'std::map<char,class Command *,struct
> std::less<char>,class std::allocator<class Command *> >' being compiled


You would probably only get this warning in the debug builds. You can
(almost) safely suppress this warning using the following pragma
directive:

#pragma warning(disable: 4786)

 
Reply With Quote
 
 
 
 
Owen Jacobson
Guest
Posts: n/a
 
      12-11-2007
On Dec 11, 7:27 am, (E-Mail Removed) wrote:
> I have a MyIOManager Object.
> In this object I have a ""typedef map<_TCHAR, Command *> cmdMap""
>
> I also have a CommandManager & Command Objects.
>
> // MyIOManager class
> ...
> typedef map<_TCHAR, Command *> commandMap;
> ...
> class MyIOManager
> {
> ...
> commandMap cmdMap;
> CommandManager * cmdManager;
> Command * cmd
> ...
>
> }
>
> MyIOManager::StartIO()
> {
> ...
> cmd = cmdManager->CatchCommand( cmdMap );
> ...
>
> }
>
> // CommandManager class
> Command * CommandManager::CatchCommand( ... )
> {
> ...
> // return a Command *...
>
> }
>
> But I get too many warnings like the following:
> What is wrong?
> How can I fix it?
>
> I checked the MSDN Library... there is written that I should shorten
> the Identifier names..., But I don't understand, I don't have at all
> long name more than 255 characters...
>
> Thanks...
>
> d:\installingfolder\microsoft visual studio\vc98\include\xtree(200) :
> warning C4786: '?rbegin@?$_Tree@DU?$pair@$$CBDPCommand@@@std@@U_K fn@?
> $map@DPCommand@@U?$less@D@std@@V?$allocator@PComma nd@@@3@@2@U?
> $less@D@2@V?$allocator@PCommand@@@2@@std
> @@QAE?AV?$reverse_bidirectional_iterator@Viterator @?$_Tree@DU?$pair@$
> $CBDPCommand@@@std@@U_Kfn@?$map@DPCommand@@U?$less @D@std@@V?
> $allocator@PCommand@@@3@@2@U?$less@D@2@V?
> $allocator@PCommand@@@2@@std@@U?$pair@$$CBDPComman d@@@3@AAU43@PAU43@H
> @2@XZ' :
>
> identifier was truncated to '255' characters in the browser
> information
>
> d:\installingfolder\microsoft visual studio\vc98\include
> \map(46) : see reference to class template instantiation
> 'std::_Tree<char,struct std:air<char const ,class Command *>,struct
> std::map<char,class Command *,struct std::less<char>,class
> std::allocator<class Command *> >::_Kfn,struct std::less<char>,class
> std::allocator<class Command *> >' being compiled
> d:\documents\myprojects\commandmanager.h(31) : see reference
> to class template instantiation 'std::map<char,class Command *,struct
> std::less<char>,class std::allocator<class Command *> >' being compiled


Upgrade to a modern compiler. VC6 is almost ten years old and was
written before the current C++ standard. Later versions of the same
compiler have no problem with the symbols generated by template
expansion.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
identifier not found error, undeclared identifier aarthi28@gmail.com C++ 2 02-26-2007 02:11 AM
How to disable warning C4786 in VC++ 6.0? Jason Heyes C++ 5 03-04-2005 06:41 AM
Trying to declare identifier locally and hide a file scope identifier Kobu C Programming 7 02-25-2005 05:19 AM
Compiler (warning C4786:) thule C++ 4 04-02-2004 04:37 AM



Advertisments