[Mono-list] Failure to load library libpq.so

Paolo Molaro lupus@ximian.com
Tue, 27 Aug 2002 19:35:49 +0200


On 08/26/02 Rodrigo Moya wrote:
> > I had to use this ~/.mono/config file to get it to work:
> > 
> > <configuration>
> > 	<dllmap dll="pq" target="libpq.so.2" />
> > </configuration>
> > 
> hmm, so the problem seems to be that mono on windows tries to open the
> .dll file for the function, whereas you've got .so.n.
> 
> Am I right? If so, would it be the best fix to have the runtime try to
> open .dll on windows, and if not found, try to open the .so?

The problem is that opening .so only works if you have the development
package installed for a library, otherwise, you need to use the
soname, in this case libpq.so.2.
The right thing to do is: use the windows library name in the DllImport
attribute and supply a mono-config snippet to be used when running with
the mono runtime.

lupus

-- 
-----------------------------------------------------------------
lupus@debian.org                                     debian/rules
lupus@ximian.com                             Monkeys do it better