set up external vs proect using c++

Charly Beck's icon

i want to create an external using c++ code. (for the max sdk i still wanna use c-functions).. now i'm not sure what way to prefer:

a) setup a c++ project from scratch
b) modify an existing sample project to accept c++

for b) i think it is just a compiler setting but i couldn't find it.

can someone help?

volker böhm's icon

you might like to have a look at this:
https://github.com/Cycling74/max-devkit

Charly Beck's icon

thanks. but it does not seem to be a visual studio-project... i want to know the settings for vs project to allow cpp...

it's just about enabling c++ in the visual studio project. the sample projects do not support cpp files..

volker böhm's icon

i haven't tried this myself, but my understanding is, that you can generate vs projects (with cmake). Have a look at the readme.md

Charly Beck's icon

ah ok i see... yes that can be a way... however, i just decided to do it differently... i don't need c++ in the project with the max external anymore. but good to remember this repository...

Timothy Place's icon

The easiest way to get started on a C++ project (assuming you have Visual Studio 2019 or Xcode 11) is to grab the *Min-DevKit* package from Max's Package Manager. The launcher patch for the package should walk you through.

Cheers,
Tim

Charly Beck's icon

i found it... it's just about writting a c++ class inside a max external project template... no project templates applicable / necessarry because i allready have a project.

Setting File=>Properties=>C/C++=>Extended=>Compilation Type: