[CONNECT C++] Setting up C++ Visual Studio Project problems

hoping someone might be able to help me out. I have been writing addins in C#, but now im trying to start out with using c++/Cli for some wrappers. but I'm getting errors from the start...

here are the steps I took to create a c++/Cli  class project.

1.open VS2015 and create new c++/CLI class project,

2. close and open the sln file from MicroStation SDK command prompt

3. add include location to properties.

4. add lib location to properties

5. then all I did was start to add using statements to my header file. I only added #include<Mstn\MdlApi\MdlApi.h>

once I added that I got 2 errors.

cannot open source file "_config-eccp.h"

and #error directive: Data Alignment must be defined in basedefs.h.

im a newbie what it comes to c++...

Parents Reply
  • I really don't know what I'm doing when it comes to these bmake files

    Most of us are in the same boat.  I've been doing this stuff for more than two decades and still find those *.mki include files a mystery.  Fortunately, we don't have to get involved with those too often (and only for reference, never to edit).

    The simplest approach: when in Rome, do as the Romans do.  Copy the example bmake files and modify.

    ..\SDK\include\Bentley\stdcxx\rw\config.h contains some information for the C++ compiler.  I've never used it or seen it mentioned.  Best left alone.  However, that config.h has only 36 lines. 

    There is  _config.h that has more lines and this...

    // NOTE: the __EDG__ macro is #defined by most EDG-based compilers
    #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__

    I've never seen that file mentioned nor have I had to use it.  Why it attempts to include the missing _config-eccp.h is buried in the C++ compiler.  I don't know what defines __EDG__ — it's not in any of the __EDG__ files.

    Regards, Jon Summers
    LA Solutions