I have a C++ application which is g++ compiled executable from a .cpp file. Now I want to call the methods in this .cpp file or/executable into my C# application. 

I was looking into different ways to be able to do it and I came across P/Invoke. However, it sounds like the starting point for a C++ application to be p/Invoked is that it needs to be a DLL. I do not have a DLL and rather have this executable. 

What can I do so that this code is reference-able in my C# P/Invoke layer?