Enraged, I pass my constant constant values ββfrom my C ++ to my C # when I run it through a callback, but I'm wondering if there is a way to define them in the C ++ header file, which I can also refer to in C #.
I already do this with listings, as they are easy. I include the file both in my C ++ library project (via the .h file with the pragma once at the top), and my C # application (as a link):
#if _NET public #endif enum ETestData { First, Second };
I know this sounds dirty, but it works :)
But ... how can I do the same with string constants - initially I think the syntax is too different between platforms, but maybe there is a way?
Using smart syntax involving #if _NET, #defines, etc.
Using resource files?
Using a C ++ / CLI library?
Any ideas?
c ++ string c # managed unmanaged
Surfbutler
source share