[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
  • Hi John,

    I am happy that Jon answered the same way as I did in a former discussion: Use bmake and .mke files in this situation.

    Really, it's not simple answer these questions, because to set up C++/CLI project properly, when four different worlds intersects (native configuration of standard C++ header and libs, of MicroStation API files, managed standard configuration and optionally also references to used MicroStation assemblies), usually requires full attention.

    BTW Is VS2015 the right version to be used? You do not specify product and version correctly (please, follow the best practices!), but for MicroStation CE Update 12, Visual Studio 2017 is required.

    I recommend, in the first step, to try to compile and run mixed mode example delivered with SDK to ensure required tools and files are available on your computer.

    Later, when you really want to stick on Visual Studio solution, you can log bmake output (in verbose mode optionally) and to check what parameters are passed to compiler and linker and set it in the same way in Visual Studio.

    With regards,

      Jan

Reply
  • Hi John,

    I am happy that Jon answered the same way as I did in a former discussion: Use bmake and .mke files in this situation.

    Really, it's not simple answer these questions, because to set up C++/CLI project properly, when four different worlds intersects (native configuration of standard C++ header and libs, of MicroStation API files, managed standard configuration and optionally also references to used MicroStation assemblies), usually requires full attention.

    BTW Is VS2015 the right version to be used? You do not specify product and version correctly (please, follow the best practices!), but for MicroStation CE Update 12, Visual Studio 2017 is required.

    I recommend, in the first step, to try to compile and run mixed mode example delivered with SDK to ensure required tools and files are available on your computer.

    Later, when you really want to stick on Visual Studio solution, you can log bmake output (in verbose mode optionally) and to check what parameters are passed to compiler and linker and set it in the same way in Visual Studio.

    With regards,

      Jan

Children
No Data