[CONNECT C++] _config-eccp.h

Occasionally, usually when setting up a new C++ project, I see this error from IntelliSense and the C++ compiler: cannot open source file "_config-eccp.h" (dependency of "Mstn/MdlApi/MdlApi.h").  It's sole mention is  in include file _config.h...

#if    defined (__EDG__)                \
    && !defined (__DECCXX)              \
    && !defined (__HP_aCC)              \
    && !defined (__INTEL_COMPILER)      \
    && !defined (_SGI_COMPILER_VERSION)
   // FIXME: make this more robust by detecting the EDG eccp demo
   // during library configuration (and avoid relying on compiler
   // specific macros)
#  include "_config-eccp.h"
#endif   // __EDG__

IntelliSense is correct: file _config-eccp.h is not part of the SDK: it doesn't exist.

Presumably something (the VC++ compiler?) is defining macro __EDG__, but those other macros are all undefined.  Judging by the comment, someone in Bentley Systems development planned to do something about this, but hasn't yet got around to it.

What can I do to suppress that message?  Is it safe simply to #undefine __EDG__?

Parents
  • Hi ,

    Though not ideal, if you have an application/common library header, then you can include this there or directly in your .cpp file having issue.  As Jan mentions, I am looking into improving the MicroStation SDK by eventually removing the 8DOT3 name requirements that are known to cause issues with IntelliSense. If this issue is not resolved by those changes, then a separate defect will be filed to address this issue as well.

    // Need to undefine __EDG__ to work-around intellisense error
    // Prevents config-eccp.h error
    #ifdef __EDG__
        #undef __EDG__
    #endif 

    HTH,
    Bob



  • if you have an application/common library header, then you can include this
    #ifdef __EDG__
        #undef __EDG__
    #endif

    Yes, that's the conclusion I reached.

    If this issue is not resolved by those changes, then a separate defect will be filed to address this issue as well

    I don't see a connection with 8DOT3 file naming.  The file _config-eccp.h simply doesn't exist in the delivered include folders...

    Directory of C:\PROGRA~1\Bentley\MICROS~1\SDK\include\Bentley\stdcxx\rw
    
    27/11/2020  06:59             9,921 _config-gcc.h
    27/11/2020  06:59             5,678 _config-msvc.h
    27/11/2020  06:59             6,360 _config-msvcrt.h
    27/11/2020  06:59            19,322 _config.h

    With a certain combination of preprocessor macros, the include logic attempts to read that non-existent file.

    in your .cpp file having issue

    It occurs with #include <Mstn/MdlApi/MdlApi.h>.  That file is commonly used as the first header in any C++ project.

     
    Regards, Jon Summers
    LA Solutions

  • so in order to get rid of the pesky _config-eccp.h error, what I do is undefine the __EDG__ macro? 

    I have one project that runs fine with nmake set with bmake project_name. 

    When I try to do it with a Bentley example, it just pop up with the error. But if I just bmake the two, both compile without problem.

Reply Children