Segmentation fault while executing Mysql application.

2005-03-25 Thread Imran Irfan
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]



Problem with source distribution in installation

2005-03-11 Thread Imran Irfan
Most respectfully, I would like to get support regarding my problem.

Description:

I have installed Linux RedHat 9 (Shrike) now i am going to install
Mysql-3.23.54a in Linux by compiling source code of respective package
which has been downloaded from this site
http://downloads.mysql.com/archives.php?p=mysql-3.23v=3.23.54a as
well as download pdf format of MySQL manual for consulting about
installation of source distribution but could not install in this
platform even all requirement is duly met according to MySQL.

Linux RedHat 9 (Shrike)
GNU gcc 3.2.2
GNU make 2.79.1
MySQL-3.23.54a.src.tar.gz


Basically, I donn't want to install this package in form of rpm format
because i want to get libmysqlclient.a file by compiling source which
is required for my project Porting MySQL on Embedded System.

I am using uCsimm DragonballEZ with uClinux for this project. I have
completed all thing which essential for a client to communicate with
MySQL server. Infact, i would like to compile all source code with
respect to the tool of uClinux GNU gcc because uCsimm is using
M68EZ328 microprocessor.

So, first of all i would like to compile all source code of the
package MySQL-3.23.54a on linux RedHat 9 (Shrike) then on uClinux.
Kindly tell me the solution of this problem. I am very greatful to you.

Contact:

vibrant wits software Inc.
  System Engineer

[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]