Hi,
Thanks for all your help, I now have things compiling. There were two
issues, libtool was indeed telling gcc to produce shared libraries, and
the --disable-shared flag is required when calling configure.
The second one was my stupidity. The error was complaining about shared
libraries in /usr/lib, not /usr/local/lib, which is where I was installing
to. /usr/lib was from one of my failed attempts to use a maildrop-devel
RPM. Sorry about that, should have spotted it sooner.
It still needed a little tweaking, the full procedure is below. Is this
worth putting in the FAQ for CentOS/RedHat distributions? If so, do you
want me to check it out on my Ubuntu distro too?
wget http://prdownloads.sourceforge.net/courier/maildrop-2.0.3.tar.bz2
bunzip2 maildrop-2.0.3.tar.bz2
tar -xvf maildrop-2.0.3.tar
cd maildrop-2.0.3
./configure --with-devel --disable-shared
make
make install-strip
make install-man
cp rfc2045/rfc2045_config.h /usr/local/include
vi /usr/local/include/rfc2045.h
< #include "../rfc2045/rfc2045_config.h" /* VPATH build */
#include "/usr/local/include/rfc2045_config.h" /* VPATH build */
Write some basic code (mdtest.c):
#include <stdio.h>
#include <rfc822.h>
#include <rfc2047.h>
#include <rfc2045.h>
int main(int argc, char *argv) {
printf("Hello World!\n");
}
Compile:
$ gcc -o mdtest -lrfc822 -lrfc2045 mdtest.c
$ ./mdtest
Hello World!
Start writing mail handling code......
Thanks again
Dave
I find that rather odd. Something must get triggered in libtool for those
distribution only -- it does not happen on Fedora.
Do you have the libtool package installed? That is, libtool,
libtool-ltld,
and libtool-ltdl-devel packages?
I will see if I can build libunicode shared and see what happens.
No. It should be the other way around.