1

My .NET managed wrapper for Botan version 1.11.17 generates this error

error C1189: #error :  <mutex> is not supported when compiling with /clr or /clr:pure.  

This error was not present when using version 1.10.9 of Botan.

Any help is appreciated to resolve this. thanks

Deduplicator
  • 44,692
  • 7
  • 66
  • 118
erotavlas
  • 4,274
  • 4
  • 45
  • 104
  • 1
    Looks like that version of Botan exposes some dependencies on C++11 features that are not supported by C++/CLR. If std::mutex is only used in some isolated features of Botan that you don't need, you can always comment out that part. Otherwise, you might have to stick to an older version – KABoissonneault Jun 26 '15 at 13:15
  • `#pragma managed` etc? – Yakk - Adam Nevraumont Jun 26 '15 at 14:06
  • @KABoissonneault What about a wrapper in C++ that uses this library. And then I make a CLR wrapper around that for use in C#? – erotavlas Jun 26 '15 at 18:10
  • 1
    @erotavlas If you can make it so that your CLR wrapper doesn't have to include headers that contain references to std::mutex and other stuff, it should be fine. Basically, your C++ wrapper should use the Botan stuff only in its cpp files. Then your CLR wrapper should be fine, since it won't even know that mutexes are involved in your C++ wrapper – KABoissonneault Jun 26 '15 at 18:15

0 Answers0