Browse Source

Merge pull request #33 from ddobrev/master

Stripped "lib" from the beginning of a library name for compatibility with the .NET (that is, on Windows) way of importing DLL-s.
pull/34/head
João Matos 12 years ago
parent
commit
46ceff91a4
  1. 4
      src/Generator/Generators/CSharp/CSharpTextTemplate.cs

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

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

Loading…
Cancel
Save