[Gtk-sharp-list] .NET bindings for Tinymail, skeleton added to repository but I still have some compilation problems

Philip Van Hoof spam at pvanhoof.be
Mon Jan 28 17:41:57 EST 2008


I noticed the previous errors where created by the code generator not
coping with _func appended vfunc names in the class's structs.

I removed those from the API, now I get this list of errors (which looks
more sane to me, but still, I wonder how to fix all this).


warning CS8029: Compatibility: Use -out:FILE instead of --output FILE or -o FILE
generated/ListAdapter.cs(22,39): error CS1041: Identifier expected: `foreach' is a keyword
generated/ListAdapter.cs(14,24): error CS1527: Namespace elements cannot be explicitly declared as private, protected or protected internal
generated/ListAdapter.cs(28,36): error CS1518: Expected `class', `delegate', `enum', `interface', or `struct'
generated/ListAdapter.cs(43,29): error CS0116: A namespace can only contain types and namespace declarations
generated/ListAdapter.cs(59,29): error CS0116: A namespace can only contain types and namespace declarations
generated/ListAdapter.cs(72,29): error CS0116: A namespace can only contain types and namespace declarations
generated/ListAdapter.cs(85,29): error CS0116: A namespace can only contain types and namespace declarations
generated/ListAdapter.cs(98,31): error CS0116: A namespace can only contain types and namespace declarations
generated/ListAdapter.cs(114,31): error CS0116: A namespace can only contain types and namespace declarations
generated/ListAdapter.cs(130,29): error CS0116: A namespace can only contain types and namespace declarations
generated/ListAdapter.cs(147,38): error CS1002: Expecting `;'
generated/ListAdapter.cs(140,29): error CS0116: A namespace can only contain types and namespace declarations
generated/LockableAdapter.cs(18,45): error CS1041: Identifier expected: `lock' is a keyword
generated/LockableAdapter.cs(14,24): error CS1527: Namespace elements cannot be explicitly declared as private, protected or protected internal
generated/LockableAdapter.cs(22,40): error CS1518: Expected `class', `delegate', `enum', `interface', or `struct'
generated/LockableAdapter.cs(32,29): error CS0116: A namespace can only contain types and namespace declarations
generated/LockableAdapter.cs(45,29): error CS0116: A namespace can only contain types and namespace declarations
generated/LockableAdapter.cs(57,38): error CS1002: Expecting `;'
generated/LockableAdapter.cs(54,29): error CS0116: A namespace can only contain types and namespace declarations
generated/MergeFolder.cs(150,39): error CS0102: The type `Tny.MergeFolder' already contains a definition for `FolderType'
generated/MergeFolder.cs(71,39): (Location of the symbol related to previous error)
Compilation failed: 20 error(s), 3 warnings
make[3]: *** [libtinymail-sharp.dll] Error 1
make[3]: Leaving directory `/home/pvanhoof/repos/tinymail/trunk/bindings/dotnet'



On Mon, 2008-01-28 at 00:35 +0100, Philip Van Hoof wrote:
> Hi there,
> 
> I just added the skeleton for .NET bindings to Tinymail.
> 
> Tinymail is a library intended for mobile E-mail clients.
> 
> The idea behind the library is to give infrastructure, tools and types
> to build an E-mail client that'll run on a mobile device. It's core
> goals are low memory consumption, few round trips and low bandwidth
> requirements.
> 
> An example is Nokia's Modest which is using  Tinymail to create an
> E-mail client for the N800 and N810 devices. 
> 
> bla bla bla
> 
> Its types are very often GTypeInterface ones. I learned from Mike's blog
> that newer Gapi versions have some support for this build in.
> 
> Eager to test this stuff, I tried it and indeed I'm seeing the various
> Gapi tools find my interfaces and create .NET equivalents.
> 
> This is the SVN commit for the skeleton, by the way:
>   http://tinymail.org/trac/tinymail/changeset/3302
> You enable it using --enable-dotnet-bindings
> 
> cd bindings/dotnet ; make
> 
> It wont compile yet, though. I got these errors:
> 
>          AssemblyInfo.cs generated/*.cs -o libtinymail-sharp.dll
> warning CS8029: Compatibility: Use -unsafe instead of --unsafe
> warning CS8029: Compatibility: Use -target:KIND instead of --target KIND
> warning CS8029: Compatibility: Use -out:FILE instead of --output FILE or -o FILE
> generated/Account.cs(75,33): error CS0102: The type `Tny.AccountImplementor' already contains a definition for `PassFuncFunc'
> generated/Account.cs(73,33): (Location of the symbol related to previous error)
> generated/Account.cs(76,36): error CS0102: The type `Tny.AccountImplementor' already contains a definition for `ForgetPassFuncFunc'
> generated/Account.cs(74,36): (Location of the symbol related to previous error)
> generated/Account.cs(77,22): error CS0102: The type `Tny.AccountImplementor' already contains a definition for `PortFunc'
> generated/Account.cs(71,22): (Location of the symbol related to previous error)
> generated/Account.cs(78,24): error CS0102: The type `Tny.AccountImplementor' already contains a definition for `UrlStringFunc'
> generated/Account.cs(72,24): (Location of the symbol related to previous error)
> generated/Account.cs(86,38): error CS0102: The type `Tny.AccountImplementor' already contains a definition for `ConnectionPolicyFunc'
> generated/Account.cs(85,38): (Location of the symbol related to previous error)
> generated/Folder.cs(85,39): error CS0102: The type `Tny.FolderImplementor' already contains a definition for `MsgRemoveStrategyFunc'
> generated/Folder.cs(84,39): (Location of the symbol related to previous error)
> generated/Folder.cs(87,40): error CS0102: The type `Tny.FolderImplementor' already contains a definition for `MsgReceiveStrategyFunc'
> generated/Folder.cs(86,40): (Location of the symbol related to previous error)
> generated/MergeFolder.cs(150,39): error CS0102: The type `Tny.MergeFolder' already contains a definition for `FolderType'
> generated/MergeFolder.cs(71,39): (Location of the symbol related to previous error)
> generated/MimePartSaver.cs(21,42): error CS0102: The type `Tny.MimePartSaverImplementor' already contains a definition for `SaveStrategyFunc'
> generated/MimePartSaver.cs(20,42): (Location of the symbol related to previous error)
> generated/MimePartView.cs(21,30): error CS0102: The type `Tny.MimePartViewImplementor' already contains a definition for `PartFunc'
> generated/MimePartView.cs(20,30): (Location of the symbol related to previous error)
> generated/MsgView.cs(24,25): error CS0102: The type `Tny.MsgViewImplementor' already contains a definition for `MsgFunc'
> generated/MsgView.cs(23,25): (Location of the symbol related to previous error)
> Compilation failed: 11 error(s), 3 warnings
> make: *** [libtinymail-sharp.dll] Error 1
> pvanhoof at schtrumpf:~/repos/tinymail/trunk/bindings/dotnet$ 
> 
> 
> I wonder what my options are. Can I override sufficient things to get
> rid of these problems? Can I provide my own alternative code for the
> properties and methods that are failing here?
> 
> And how? And if documented, where can I find this documentation?
> 
> Another question: can I change the type hierarchy of generated types? I
> for example have a Tny.List and a Tny.Iterator that I sure would like to
> adapt to make it implement the IList interface of .NET. I also have a
> Tny.Stream that I think could use some System.IO.Stream magic here and
> there.
> 
> I would prefer to have language bindings that are comparable to each
> other in API. I'm adding Jürg Billeter in CC. Jürg coded on the Vala
> bindings for Tinymail. Vala, the programming language, is being designed
> after C#. Therefore I'm confident that the bindings can be made to look
> the same.
> 
> 
> 
-- 
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
http://pvanhoof.be/blog
http://codeminded.be






More information about the Gtk-sharp-list mailing list