LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 05-03-2007, 04:47 AM   #1
krisvamc
LQ Newbie
 
Registered: Apr 2007
Posts: 29

Rep: Reputation: 15
Mysql_connect Error, Could Anybody Tell Me When This Error Comes




Hi,

I am trying to compile one file. I am getting mysql error.

Could anybody tell me when this error comes and how to rectify this.

The error is :

handling.cc: In function ‘bool CreateDatabase()’:
handling.cc:65: error: ‘mysql_connect’ was not declared in this scope
handling.cc: In function ‘bool OpenDatabase()’:
handling.cc:122: error: ‘mysql_connect’ was not declared in this scope
make: *** [handling.o] Error 1


kris.
 
Old 05-03-2007, 06:44 AM   #2
deadeyes
Member
 
Registered: Aug 2006
Posts: 609

Rep: Reputation: 79
Quote:
Originally Posted by krisvamc

Hi,

I am trying to compile one file. I am getting mysql error.

Could anybody tell me when this error comes and how to rectify this.

The error is :

handling.cc: In function ‘bool CreateDatabase()’:
handling.cc:65: error: ‘mysql_connect’ was not declared in this scope
handling.cc: In function ‘bool OpenDatabase()’:
handling.cc:122: error: ‘mysql_connect’ was not declared in this scope
make: *** [handling.o] Error 1


kris.
It means that the variable is not in the scope.
So if you declare a variable in a function, then it will not be accessible outside of it.

If you want the variable to be available for all functions, put the member(variable) declaration out of any method (function).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mysql_connect Error, Could Anybody Tell Me When This Error Comes krisvamc Linux - Software 1 05-03-2007 06:45 AM
Suse CUPS error: cups(File)DoRequest error:client-error-bad-request smdonelan Linux - Hardware 6 04-17-2007 06:46 PM
I need help on this PHP error -- "Call to undefined function: mysql_connect()" yzh999 Linux - Software 1 08-12-2006 03:14 AM
php mysql_connect error compu73rg33k Linux - Software 11 04-02-2005 05:37 AM
Redhat Enterprise AS, php-mysql-4.3.3-4.1.i386.rpm, mysql_connect() error apradhan Linux - Distributions 0 02-18-2004 03:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 01:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration