locked
error C2065: 'XXFILEXX' : undeclared identifier RRS feed

  • Question

  • hi

    I am facing following bunch of error. 

    C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\malloc.h(247) : error C2065: 'XXFILEXX' : undeclared identifier
    C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocinfo(34) : error C2065: 'XXFILEXX' : undeclared identifier
    C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocinfo(148) : error C2065: 'XXFILEXX' : undeclared identifier
    C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocinfo(161) : error C2065: 'XXFILEXX' : undeclared identifier
    C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(1814) : error C2065: 'XXFILEXX' : undeclared identifier
    C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(2042) : error C2065: 'XXFILEXX' : undeclared identifier
    C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(2316) : error C2065: 'XXFILEXX' : undeclared identifier


    Wednesday, November 12, 2014 6:18 AM

Answers

  • On 11/12/2014 2:47 AM, "priyanka adam" wrote:

                 free(_Memory);   // 247th line

    Somewhere in your project, you define a macro with the name "free" that expands to XXFILEXX. Figure out where and why.


    Igor Tandetnik
    • Proposed as answer by Rahul Y Friday, November 21, 2014 6:21 AM
    • Marked as answer by Shu 2017 Monday, November 24, 2014 12:51 PM
    Wednesday, November 12, 2014 2:42 PM

All replies

  • On 11/12/2014 1:18 AM, "priyanka adam" wrote:

    I am facing following bunch of error.

    C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\malloc.h(247) : error C2065: 'XXFILEXX' : undeclared identifier

    So, what code is on line 247 in malloc.h?


    Igor Tandetnik
    Wednesday, November 12, 2014 6:50 AM
  • hi Igor,

    m not using any FILE handling.. 
    This there any issue related to headfile..?

    Wednesday, November 12, 2014 6:58 AM
  • hi Igor,

    m not using any FILE handling.. 
    This there any issue related to headerfile..?

    Wednesday, November 12, 2014 6:58 AM
  • Open the file C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\malloc.h in your favorite text editor, and copy line number 247 here (and perhaps a few lines above and below, for context).

    Igor Tandetnik

    Wednesday, November 12, 2014 7:03 AM

  • #ifdef _FREEA_INLINE
    /* _freea must be in the header so that its allocator matches _malloca */
    #if !defined(__midl) && !defined(RC_INVOKED)
    #undef _freea
    _CRTNOALIAS __inline void __CRTDECL _freea(_Inout_opt_ void * _Memory)
    {
        unsigned int _Marker;
        if (_Memory)
        {
            _Memory = (char*)_Memory - _ALLOCA_S_MARKER_SIZE;
            _Marker = *(unsigned int *)_Memory;
            if (_Marker == _ALLOCA_S_HEAP_MARKER)
            {
                free(_Memory);   // 247th line
            }
    #if defined(_ASSERTE)
            else if (_Marker != _ALLOCA_S_STACK_MARKER)
            {
                _ASSERTE(("Corrupted pointer passed to _freea", 0));
            }
    #endif
        }
    }
    #endif
    #endif
    Wednesday, November 12, 2014 7:47 AM
  • On 11/12/2014 2:47 AM, "priyanka adam" wrote:

                 free(_Memory);   // 247th line

    Somewhere in your project, you define a macro with the name "free" that expands to XXFILEXX. Figure out where and why.


    Igor Tandetnik
    • Proposed as answer by Rahul Y Friday, November 21, 2014 6:21 AM
    • Marked as answer by Shu 2017 Monday, November 24, 2014 12:51 PM
    Wednesday, November 12, 2014 2:42 PM