Browse Source

Remove the shared library extension when printing it in DllImport declarations.

pull/1/head
triton 13 years ago
parent
commit
001348d26d
  1. 5
      src/Generator/Generators/CSharp/CSharpTextTemplate.cs

5
src/Generator/Generators/CSharp/CSharpTextTemplate.cs

@ -1724,6 +1724,11 @@ namespace CppSharp.Generators.CSharp @@ -1724,6 +1724,11 @@ namespace CppSharp.Generators.CSharp
FindMangledDeclLibrary(function, out library);
var libName = (library != null) ? library.FileName : "SymbolNotFound";
var index = libName.LastIndexOf('.');
if (index >= 0)
libName = libName.Slice(0, index);
Write("[DllImport(\"{0}\", ", libName);
var callConv = Helpers.ToCSharpCallConv(function.CallingConvention);

Loading…
Cancel
Save