PathEngine home previous: Microsoft CLRnext: Naming Conventions
Contents, Programmers Guide, Using PathEngine with Other Languages, Microsoft CLR, Project Setup

Project Setup

The interface files for CLR interop can be found in SDKRoot/code/interop/CLR. This is a essentially a set of class definitions written in C++/CLI to make the PathEngine interfaces available to the CLR.

The C++/CLI interface files can either be incorporated into an existing C++/CLI component of your project, or built as a stand-alone C++/CLI wrapper for the PathEngine run-time dll. This page explains how to build the C++/CLI interface files as a stand-alone C++/CLI wrapper class library project.

Visual Studio project configuration files are not currently provided for this (which avoids complicating the PathEngine release process with Visual Studio versioning issues), but it's pretty straightforward to create the relevant projects in Visual Studio based on standard project templates. (The steps described on this page are based on Visual Studio 2019, but it should be easy to adapt these steps, if necessary, for other Visual Studio versions.)

Creating the C++/CLI wrapper project

Create a new project with the 'CLR Class Library (.NET Core)' template, for language C++, platform windows. (Certain Visual Studio installation components such as .NET development and C++/CLI build support may need to be present in order for this to be available.)

You can choose a suitable project name. The exact name of this project doesn't matter so much, as we'll be linking to it from other CLR projects with Visual Studio references, but I chose to call this project 'PathEngine_CLR' for consistency.

You should now be able to build the class library project, although you may see some warnings about type conversions and calls to sprintf.


Documentation for PathEngine release 6.04 - Copyright © 2002-2024 PathEnginenext: Naming Conventions