automake
[Top][All Lists]
Advanced

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

Problems to include mysql.h in the Makefile


From: Damian Montaldo
Subject: Problems to include mysql.h in the Makefile
Date: Tue, 17 Jul 2007 15:22:55 -0300

Hi, i'm having some problems to include mysql.h when i compile C source code.

I'm using this macro
http://autoconf-archive.cryp.to/ax_lib_mysql.html
to find the path to mysql.h in a Debian Linux and work fine.

$ ./configure
...
checking for mysql_config... /usr/bin/mysql_config
checking for MySQL libraries... yes
...

When i run configure it generates this line in the Makefile file:

MYSQL_CFLAGS = -I/usr/include/mysql -DBIG_JOINS=1
MYSQL_CONFIG = /usr/bin/mysql_config
MYSQL_LDFLAGS = -L/usr/lib/mysql -lmysqlclient
MYSQL_VERSION = 5.0.32
...
.c.o:
      if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
      then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f
"$(DEPDIR)/$*.Tpo"; exit 1; fi

But when i run make it doesn't include the MYSQL_CFLAGS so it's
imposible to resolve this #include <mysql.h>

$ make
if gcc -DHAVE_CONFIG_H -I. -I. -I..    -g -O2 -MT clumon.o -MD -MP -MF
".deps/clumon.Tpo" -c -o clumon.o clumon.c; \
      then mv -f ".deps/clumon.Tpo" ".deps/clumon.Po"; else rm -f
".deps/clumon.Tpo"; exit 1; fi
clumon.c:38:19: error: mysql.h: No such file or directory

I all ready tried with this flag: --with-mysql=yes

I really need some help to know where i have to change to fix the problem.

Thanks,
Damian.




reply via email to

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