Browse Source

Stripped "lib" from the beginning of a library name for compatibility with the .NET (that is, on Windows) way of importing DLL-s.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
pull/33/head
Dimitar Dobrev 12 years ago
parent
commit
652c6e1011
  1. 4
      src/Generator/Generators/CSharp/CSharpTextTemplate.cs

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

@ -2114,6 +2114,10 @@ namespace CppSharp.Generators.CSharp
libName = (library != null) ? library.FileName : "SymbolNotFound"; libName = (library != null) ? library.FileName : "SymbolNotFound";
libName = Path.GetFileNameWithoutExtension(libName); libName = Path.GetFileNameWithoutExtension(libName);
} }
if (libName != null && libName.Length > 3 && libName.StartsWith("lib"))
{
libName = libName.Substring(3);
}
Write("[DllImport(\"{0}\", ", libName); Write("[DllImport(\"{0}\", ", libName);

Loading…
Cancel
Save