how to create a wrapper for C++ class libraries

i want to use some C++ libraries in unity. unity just can use C style function libraries. how should i wrap the classes? think i want to use physx cloth or any other library. unity already do that with physx and some other libraries so it's possible. i know that C++/CLI is not an option here because they are mixed assemblies and mono doesn't support them. my target is windows. some of game libraries are static .lib files and some of them are DLLs. most of the third party game related libraries are C++ class libraries so we all need this. i know about some tools to create wrappers but i want to do that myself programmaticly because tools don't work well always.

When you are targeting Mac/PC standalones, then you can write plugins for Unity in C - and use those to access your C++ libraries.

Read the docs to learn how.