[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU]Call for testing Swig + Pnet = SwigSharp (For Debian)

From: minddog
Subject: Re: [DotGNU]Call for testing Swig + Pnet = SwigSharp (For Debian)
Date: Wed, 12 Mar 2003 17:13:37 -0700
User-agent: KMail/1.5.9

Okay so I did a little hacking today with your swigsharp...

I decided to try the libpq libs for postgresql, pretty much:
swig -csharp -m libpgsharp libpg-fe.h 
gcc libpg-fe_wrapper.c  
gcc -shared libpg-fe_wrapper.c -o
cscc *.cs -o libpgsharp.dll
done =)  ...with a fix in some of the autogenerated code
theres a bug with get/set methods where value is supposed to be an IntPtr, but 
is another Object so you must run a static method on that type to receive the 
private address. 

okay so i ran a simple test case(still need to have more time looking at the 

using System;

public class Test : libpgsharp
        public static void Main(String[] args)
                String dbName = "test";
                SWIGTYPE_p_pg_conn conn =  libpgsharp.PQsetdbLogin("localhost", 
"5432", "", 
"", dbName, "minddog", null);
                if (libpgsharp.PQstatus(conn) == libpgsharp.CONNECTION_BAD)
                        Console.WriteLine("Connection to database {0} 
failed.\n", dbName);


And a test of it

ilrun test.exe 
Connection to database test failed.

FATAL:  IDENT authentication failed for user "minddog"

So it doesn't quite work yet, but it will be nice to _finally_ have a GNU 
compatible library for database connections.  This will work tomorrow, =)

Hopefully I can get the Virtual Identities FOAF server setup with the database 

Mdupont, great work on getting that going!  

What next? OpenGL, pnet itself?! hehe 

--minddog( Adam Ballai )

"I try to take it one day at a time, but several of them attack me at once."

reply via email to

[Prev in Thread] Current Thread [Next in Thread]