MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Mohsen Pahlevanzadeh Date:February 18 2005 2:53pm
Subject:Re: Header files & data types
View as plain text  
Dear Michael,
I have found mysql.h.Yes,It is in /usr/include/mysql
My code is :
 : CCore()
 MySQL *x;
}//end of CMysql constructor

& My Makefile is :
#LIBS=-L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm
#LIBS_R=-L/usr/lib/mysql -lmysqlclient_r -lpthread -lz -lcrypt -lnsl -lm
#MYSQL_LIBS=-L/usr/lib/mysql  -lmysqld -lpthread -lz -lcrypt -lnsl -lm
-lpthread -lrt
#CXXFLAGS=-march=i486 -mcpu=i686

LIBS=-L'/usr/lib/mysql' -lmysqlclient -lz -lcrypt -lnsl -lm


sql2sql : sql2sql.o
        $(CXX) $(LIBS)  -o sql2sql sql2sql.o ;
sql2sql.o : sql2sql.cpp
        $(CXX) -c $(INCS) core.cpp mysql_engine.cpp sql2sql.cpp;

clean :
        rm -rf sql2sql.o mysql_engine.o core.o

Output of make command is :

[root@localhost sql2sql]# make
g++ -c -I'/usr/include/mysql'  core.cpp mysql_engine.cpp sql2sql.cpp;
mysql_engine.cpp: In constructor `CMysql::CMysql()':
mysql_engine.cpp:25: `MySQL' undeclared (first use this function)
mysql_engine.cpp:25: (Each undeclared identifier is reported only once for
   function it appears in.)
mysql_engine.cpp:25: `x' undeclared (first use this function)
make: *** [sql2sql.o] Error 1

Please help me .....

> Depnding on how your mysql was installed, you should have mysql.h on
> your system somewhere; perhaps in /usr/include/mysql or elsewhere
> depending on installation parameters..  If not, you can download
> libraries and headers appropriate to your system version from
> On Thu, 2005-02-17 at 13:12, Mohsen Pahlevanzadeh wrote:
>> Dears,I must use data type in C++,same MySQL type.
>> But i don't name of their header files.
>> Please guide me.
> --
>  - michael dykman
>  - michael@stripped

Header files & data typesMohsen Pahlevanzadeh17 Feb
  • Re: Header files & data typesMichael Dykman17 Feb
    • Re: Header files & data typesMohsen Pahlevanzadeh18 Feb