• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3819
  • Last Modified:

__func__ on VC++

Hello

I'm trying to build a project in Visual Studio 6.0 and it's telling me that __func__ is an unrecoginzed symbol. Is there some header file I need to include for this, or is there another macro in VC++ I should be using

Thanks

0
nerdmike
Asked:
nerdmike
  • 2
1 Solution
 
AlexFMCommented:
VC++ has __FUNCTION__ predefined macro:
http://msdn2.microsoft.com/en-us/library/ms253913.aspx

If this is what you need, use this constant or add line:

#define __func__ __FUNCTION__
0
 
nerdmikeAuthor Commented:
odd, i added the #define statement and I get a similar error

"error C2065: '__FUNCTION__' : undeclared identifier"

after reading the link you posted, I read the following

"__FUNCTION__ is not expanded if you use /EP (Preprocess to stdout Without #line Directives) or /P (Preprocess to a File) compiler options."

How can I check to see if these settings are not used (sorry, I don't usually use VC++ and hence don't know what to do about this)

0
 
AlexFMCommented:
Sorry, it looks like VC++ 6.0 doesn't support __FUNCTION__:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/html/_predir_predefined_macros.asp

My previous link pointed to VC++ 8.0, so I haven't solution for you.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now