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...
cannot open source file "_config-eccp.h" (dependency of "Mstn/MdlApi/MdlApi.h")
_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.
_config-eccp.h
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.
__EDG__
What can I do to suppress that message? Is it safe simply to #undefine __EDG__?
#undefine __EDG__
Hi Jon Summers,
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
Robert Hook said: 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.
Robert Hook said: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.
Robert Hook said: 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.
#include <Mstn/MdlApi/MdlApi.h>
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.
Hi amender,
please respect the rules and do not steal existing (and nearly a year old) discussion with own new question. Ask in a new post and specify you environment (SDK version, VS version...).
amender carapace said:so in order to get rid of the pesky _config-eccp.h error, what I do is undefine the __EDG__ macro?
I do not understand what your question is: Did you try solution provided by Bob Hook and verified by Jon, and it does not work?
amender carapace said:When I try to do it with a Bentley example
What is "Bentley example"?
amender carapace said:But if I just bmake the two, both compile without problem.
What is "the two" and "both"?
Regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point