Not logged in. · Lost password · Register
Forum: agsXMPP SDK Support RSS
Avatar
jcmag #1
Member since Jan 2007 · 9 posts
Group memberships: Members
Show profile · Link to this post
Subject: Compiling on Mono (Ubuntu)
I'm trying to compile agsXMPP on Mono 1.2, Ubuntu 6.10, using MonoDevelop 0.12.
If I configure MonoDevelop to use the 1.1 compiler, the compilation succeeds (with 21 warnings)
If I configure MonoDevelop to use the 2.0 compiler, I have the following error:

[...]/IO/Compression/DeflaterHuffman.cs(806,58): error CS1002: Expecting ';'

Any idea?

(Maybe you could also release a Mono agsXMPP.dll file and a MonoDevelop solution.)
Avatar
jcmag #2
Member since Jan 2007 · 9 posts
Group memberships: Members
Show profile · Link to this post
found a fix, replace :

if (storedOffset >= 0 && storedLength + 4 < opt_len >> 3) {

with:

if (storedOffset >= 0 && storedLength + 4 < (opt_len >> 3)) {


Now it compiles with 2.0.
But I have an exception with this simple code:
                public static void Main(string[] args)
        {
            Console.WriteLine("Begin...");
           
            XmppClientConnection connec = new XmppClientConnection("jabber.org");
            connec.Open("user", "pwd");
            connec.Send(new Message("user2@jabber.org", MessageType.chat, "Hello!!!"));
           
            Console.WriteLine("End...");
            Console.ReadLine();
        }

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object
  at agsXMPP.net.ClientSocket.Send (System.Byte[] bData) [0x00041] in /home/jc/Projects/MyHal/agsXMPP/net/ClientSocket.cs:499
  at agsXMPP.net.ClientSocket.Send (System.String data) [0x00000] in /home/jc/Projects/MyHal/agsXMPP/net/ClientSocket.cs:473
  at agsXMPP.XmppConnection.Send (System.String xml) [0x00008] in /home/jc/Projects/MyHal/agsXMPP/XmppConnection.cs:301
  at agsXMPP.XmppConnection.Send (agsXMPP.Xml.Dom.Element e) [0x00000] in /home/jc/Projects/MyHal/agsXMPP/XmppConnection.cs:313
  at MyHalConsole.MainClass.Main (System.String[] args) [0x00025] in /home/jc/Projects/MyHal/MyHalConsole/Main.cs:16

Any idea??
Avatar
Alex #3
Member since Feb 2003 · 4245 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello jcmag,

for your first problem Mono is not .NET 2.0 compatible yet. So i would compile it .NET 1.1 compatible under Mono with the MONOSSL condition.

agsXMPP connects asynchronous- This is the reason why you are not connected to the server after the open methods returns. There are many threads about this problem here i the forum.

Alex
Alexander Gnauck
AG-Software
Avatar
jcmag #4
Member since Jan 2007 · 9 posts
Group memberships: Members
Show profile · Link to this post
Thank you very much !
I have done my first Mono application that works on Windows and Linux ! great !
Avatar
Alex #5
Member since Feb 2003 · 4245 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
In reply to post #1
Quote by jcmag on 2007-01-07, 18:22:
I'm trying to compile agsXMPP on Mono 1.2, Ubuntu 6.10, using MonoDevelop 0.12.
If I configure MonoDevelop to use the 1.1 compiler, the compilation succeeds (with 21 warnings)
If I configure MonoDevelop to use the 2.0 compiler, I have the following error:

[...]/IO/Compression/DeflaterHuffman.cs(806,58): error CS1002: Expecting ';'

Any idea?

I fixed this in our working copy. It will be in SVN with the next commit.

Quote by jcmag on 2007-01-07, 18:22:
(Maybe you could also release a Mono agsXMPP.dll file and a MonoDevelop solution.)

Mono is binary compatible with Windows, which means that you can run binaries produced by .NET compilers from Microsoft.

Alex
Alexander Gnauck
AG-Software
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP SDK Support RSS