Problem is the order in which the gcc command line is given by configure
and/or automake.
I can't seem to figure out how to get the LDADD libraries to go at the
end of the command line. Is there an automake macro for this?
Ilja
Roel Rozendaal - IC&S wrote:
Hi,
I experienced the same problem on my mac; i solved it by replacing the
order of the arguments of gcc. The linker options are passed to gcc by
means of a variable: $xxx_LDFLAGS where xxx stands for the program to
build (dbmail-smtp, dbmail-imapd, etc). Somewhere in your (automake'd-)
makefile you can find the dbmail targets on lines like this:
dbmail-smtp: $(dbmail_smtp_OBJECTS) $(dbmail_smtp_DEPENDENCIES)
@rm -f dbmail-smtp
$(LINK) $(dbmail_smtp_LDFLAGS) $(dbmail_smtp_OBJECTS)
$(dbmail_smtp_LDADD) $(LIBS)
moving the _LDFLAGS variable to the end solved the problem on my system.
regards roel
Op 3-feb-04 om 4:16 heeft peter het volgende geschreven:
hello all,
I was wondering if someone could be of assitance with my not
so skillfull attempts at making the application.
I have Slakware linux v.9, with mySQL v.4 working well.
(it works fine with Apache/PHP, as well as a MS Access application
I am developing). mySQL was obtained in compiled form, and installed
with the supplied script.
I can configure dbmail after placing the mySQL /bin location in
the PATH environment variable. It compiles fine after adding
#include <time.h> to misc.c
but linking generates lots of errors (relating to not found symobols)
here is a little of the result....
gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -W -Wall -Wpointer-arith
-Wstrict-prototypes -O2 -c main.c
gcc -g -O2 -W -Wall -Wpointer-arith -Wstrict-prototypes -O2 -o
dbmail-smtp -L/usr/local/mysql/lib -lmysqlclient -lz -lcrypt -lnsl
-lm -lc -lnss_files -lnss_dns -lresolv -lc -lnss_files -lnss_dns
-lresolv config.o debug.o list.o dbmd5.o md5.o db.o misc.o mime.o
header.o pipe.o bounce.o forward.o main.o mysql/libmysqldbmail.a
sort/libsortdbmail.a auth/libauthdbmail.a
mysql/libmysqldbmail.a(dbmysql.o)(.text+0x13): In function `db_connect':
/usr/local/dbmail-2.0rc1/mysql/dbmysql.c:65: undefined reference to
`mysql_init'
mysql/libmysqldbmail.a(dbmysql.o)(.text+0x94):/usr/local/dbmail
-2.0rc1/mysql/dbmysql.c:89: undefined reference to `mysql_real_connect'
mysql/libmysqldbmail.a(dbmysql.o)(.text+0xae):/usr/local/dbmail
-2.0rc1/mysql/dbmysql.c:93: undefined reference to `mysql_error'
mysql/libmysqldbmail.a(dbmysql.o)(.text+0x13a): In function
`db_num_rows':
/usr/local/dbmail-2.0rc1/mysql/dbmysql.c:115: undefined reference to
`mysql_num_rows'
the mySQL file does exist at /usr/local/mysql/lib/mysqlclient.a
and when I rename it so that the linker cant find the file, I get
a simple "file not found" type error from the linker. So the linker
CAN find the file needed - but when it does there is some sort of
problem.
Is it a problem relating to improperly setting up the library system
(should I use ldconfig?) after installing mySQL?
Maybe it's something else.
But I am out of ideas at this stage.
gratefull for any help,
Peter.
_______________________________________________
Dbmail mailing list
Dbmail@dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail
_________________________
R.A. Rozendaal
IC&S
T: +31 30 63 55 736
F: +31 30 63 55 731
www.ic-s.nl
_______________________________________________
Dbmail mailing list
Dbmail@dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail
--
IC&S
Stadhouderslaan 57
3583 JD Utrecht
PGP-key:
http://www.ic-s.nl/keys/ilja.txt