Re: backends (ldap)
- From: Havoc Pennington <hp redhat com>
- To: monkeyiq dingoblue net au
- Cc: gconf-list gnome org
- Subject: Re: backends (ldap)
- Date: 11 Nov 2000 10:58:57 -0500
monkeyiq dingoblue net au writes:
> I am toying with some LDAP code making a backend for gconf.
>
Cool!
> I have decided to write it in C++ because C is very bad at string
> handling etc.
I think C++ mixed with C in dynamic modules is just asking for pain. C
string handling isn't so bad, using the GLib utility stuff and
GString. gchar* does implement the same iterator/container features as
vector<T> you know. ;-)
> Nov 11 03:03:53 kloof gconfd (ben-32522): Failed to load source
> `ldap:readwrite:/home/ben/.gconf': Failed: Error opening module `ldap':
> undefined symbol: cerr
If you use C++, please don't use iostreams. I am opposed to iostreams
in GConf because they cause mess when mixed with stdio and they don't
lend themselves to internationalization.
Also (and the Berkeley DB backend has this problem too, I've been
meaning to mail Colm) you need to use gconf_log(), don't write to
stderr with fprintf() or cerr. Remember this is a daemon.
Anyhow, the problem is simply that the global variable 'cerr' is in
libstdc++, which is not loaded. In principle this means you would add
libstdc++ to the LIBADD line in the Makefile.am to make it a
dependency for the module. However I have no real idea whether there's
a portable way to do this or a portable name for the standard C++
library.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]