From: William S F. <ws...@fu...> - 2008-05-28 09:34:35
|
Kazovsky Ilya wrote: > > > 2008/5/26 William S Fulton <ws...@fu... > <mailto:ws...@fu...>>: > > Kazovsky Ilya wrote: > > Hello world! > > I'm using SWIG to wrap some C library to C#. I have two modules > and two classes for this modules (i don't use automatically > generated wrappers) . One works properly, but another one does not. > > here is an examples: > > module1.i: > %module1 > %{ > #include "../wrappers/module1.h" > %} > > extern void* Foo(); > .... > this one works perfect. > > module2.i > %module2.i > %{ > #include "../wrappers/module2.h" > %} > > extern void* Bar(void*, void*); > > it wraps by C function: > SWIGEXPORT void * SWIGSTDCALL CSharp_Bar(void*, void*) {...} > > and by C# function: > class module2 > { > [DllImport("library", EntryPoint="CSharp_Bar")] > public static extern IntPtr Bar(HandleRef, HandleRef); > } > but when i run program i got this: > Unhandled Exception: System.EntryPointNotFoundException: CSharp_Bar > at (wrapper managed-to-native) > wrappers.module2PINVOKE:Bar(System.Runtime.InteropServices.HandleRef,System.Runtime.InteropServices.HandleRef) > > > You probably havn't compiled the generated wrapper into library.dll. > Check using tools like dumpbin or depends. > > William > > > I'm using Mono to build the project. All generated files are included as > external link. Here should be no mistake. > If you are using mono the tools I mentioned will still work. You'll find that they will verify that the symbol is not compiled into the dll. Also make sure your PATH is set up correctly and that you are not pointing to another dll of the same name. William |