Hello sir, I have written an application by using MySQL API for retrieving result of simple query "select * from Table_Name" but there are some modification in compilation process for getting desire results.
Modification or Alteration are: 1. I have Installed full packages of MySQL-3.23.54-11during Linux RedHat (Shrike) installation. 2. I have written an application by using following MySQL API: i- mysql_init(&mysql); ii- mysql_real_connect(&mysql,host,user,pass,db,0,NULL,0) iii- mysql_real_query(&mysql,query,50) iv- mysql_store_result(&mysql) v- mysql_fetch_row(res) vi- mysql_num_fields(res) vii- mysql_free_result(res) viii- mysql_close(&mysql); 3. I am using following files: i- mysql.h -- Header file for fucntion prototyping and use for Data-Type declaration. ii- mysql_com.h and mysql_version.h -- These header files are required for mysql.h file iii- libmysqlclient.a -- Use for required API and for compilation iv- Esql.c -- My own Application Note: mysql.h, mysql_com.h and mysql_version.h are belong to MySQL-3.23.54-11 package but libmysqlclient.a is belong to MySQL-4.1.10 package and all mentioned file are contains in a Folder 'Application'. 4. Compilation procedure: i- gcc -o App Esql.c -lz /path/to/Application/libmysqlclient.a 5. Execution procedure: i- Application> ./App 6. Execution Error: i- I have retrieved desire result with respect to query. ii- But Following error occur after print desire result on screen at end: I- Segmentation fault. 7. Experiments: i- I have examined application behaviour with libmysqlclient.a file of same package MySQL-3.23.54-11. ii- I have gained all those result what i had expected. 8. Reason: i- Source distribution MySQL-3.23.54-11.tar.gz does not install properly even all requirement are met as describe in mannual. ii- Source distribution MySQL-4.1.10.tar.gz install properly iii- I required all those files which is required for creating libmysqlclient.a file; *.c and *.o of MySQL-3.23.54-11 package which install during linux installation. So, these were fact and figure which being happen in developing application. Kindly, suggest me. I 'll be very greatful to you. IMRAN SHABBIR Software Engineer Vibrant Wits Software Inc. Pakistan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]