> exampl2.c:21: warning: return type of `main' is not
> `int'
> /usr/bin/ld: cannot find -lmysqlclient
> collect2: ld returned 1 exit status

> Please suggest any solution.

pfff 100 lines of C code that do nothing :)
If you want something that really works try this instead  :)
perl -w
use DBI;  # The module for DB connectivity,

# you need both DBD::mysql and the DBI modules installed for it to work
# perl -MCPAN -e 'install Bundle::DBI'  with a net connection to install DBI
(generally installed )
# perl -MCPAN -e 'install Bundle::DBD::mysql'

my $dbh = DBI->connect("DBI:mysql:mysql", "", "");
my $sth = $dbh->prepare("show tables");
$sth->execute;
use Data::Dumper;
print Dumper $sth->fetchrow_hashref;

For more info you can always
perldoc DBD::mysql
perldoc DBI

for the C program are you sure you have mysqlclient.so installed ? you can
try a
locate mysqlclient

that should give you a picture of whats happening, you might need to update
the ld cache,  man ldconfig to read more on that

just out of curiousity could you
cat /etc/ld.so.conf  | grep mysql
and let me know what you get

Thanks
    Dhruv


--
To unsubscribe, send mail to [EMAIL PROTECTED] with the body
"unsubscribe ilug-cal" and an empty subject line.
FAQ: http://www.ilug-cal.org/node.php?id=3

Reply via email to