The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> C Programming
|
CBuilder & MySQL error help
Discuss CBuilder & MySQL error help in the C Programming forum on Dev Shed. CBuilder & MySQL error help C programming forum discussing all C derivatives, including C#, C++, Object-C, and even plain old vanilla C. These languages are low level languages, and used on projects such as device drivers, compilers, and even whole computer operating systems.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

May 11th, 2003, 09:41 AM
|
|
Linux World Forum Admin
|
|
Join Date: Feb 2003
Location: Linux Worlds
Posts: 53
Time spent in forums: 3 h 42 m 25 sec
Reputation Power: 11
|
|
CBuilder & MySQL error help
im trying to make a litttel program using mySQL and cbuilder but the problem that every time i try to connect to the dataBase the cBuilder said : Cant load libmysql.dll even in linux using kylix 3 i can connect in the enviroment but outside it sadi : cant load libmysql.so
any help please
Last edited by linux juggler : May 13th, 2003 at 03:52 PM.
|

May 11th, 2003, 01:07 PM
|
 |
Banned ;)
|
|
Join Date: Nov 2001
Location: Woodland Hills, Los Angeles County, California, USA
|
|
I can probably answer your Kylix on Linux question. Kylix relies on a very specific set of libraries (for example, it uses a specific version of libqt), and the Borland guys don't want those libraries to be overwritten/upgraded by accident. So, to avoid this problem, the Borland guys install those libraries in a non-standard location (such as /usr/local/kylix2/bin or /usr/local/kylix3/bin).
The trouble is, when you're running your binary, outside of the development environment, it doesn't know where to find the shared libraries, since they're not in a standard directory, such as /usr/lib or /usr/local/lib. To fix this issue, you must specify this additional library directory by altering the LD_LIBRARY_PATH environment variable. You can do this in one of three ways:
(a) Fix ld.so.conf, so that it contains the additional directories. This will make the change permanent for your system, for all users.
(b) Fix your .bash_profile file to add changes to your LD_LIBRARY_PATH file, such as:
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/path/to/kylix/libs
These changes will only affect you. Other users of the system will need to make similar changes to their .profiles as well.
(c) Run your application from a shell script, instead of running it directly. The shell script will set the environment variable, LD_LIBRARY_PATH and then run your application:
#!/bin/sh
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/path/to/kylix/libs
./MyApplication
This is probably the best way, because you can use the same shell script when you deploy your application to other users who don't have kylix installed.
See http://homepages.borland.com/efg2la.../deployment.htm for more.
|

May 11th, 2003, 03:05 PM
|
 |
Contributing User
|
|
Join Date: Jan 2003
Location: USA
|
|
|
I have MySQL installed on my Windows machine and found libmySQL.dll in C:\WINDOWS\SYSTEM (I assume that you mistyped the name in your message). It's also in the mysql distribution in mysql\lib\opt, mysql\lib\debug, mysql\mysql++\lib, and mysql\mysql++\examples. Find the DLL on your Windows system and copy it to \WINDOWS\SYSTEM and that should do it. If you don't have a copy on your system, you can get a copy of it from MySQL's site, along with their mysql++ API and library.
The same should apply to the shared library file, libmysql.so, which Scorpions has already covered.
|

May 13th, 2003, 03:56 PM
|
|
Linux World Forum Admin
|
|
Join Date: Feb 2003
Location: Linux Worlds
Posts: 53
Time spent in forums: 3 h 42 m 25 sec
Reputation Power: 11
|
|
|
even so i did what you say about windows but it still give me the same ..
im using XP pro edition
any one can help me
|

May 13th, 2003, 05:24 PM
|
 |
Contributing User
|
|
Join Date: Jan 2003
Location: USA
|
|
Quote: Originally posted by linux juggler
even so i did what you say about windows but it still give me the same ..
im using XP pro edition
|
OK, I'm running Win98SE and WinME. NT, Win2k, and (I think) XP keep the OS in a different directory, \WINNT .
See if your XP has a \WINDOWS\SYSTEM directory or something similar that has lots of .DLL files in it. That should be the place.
|

May 13th, 2003, 09:06 PM
|
|
Linux World Forum Admin
|
|
Join Date: Feb 2003
Location: Linux Worlds
Posts: 53
Time spent in forums: 3 h 42 m 25 sec
Reputation Power: 11
|
|
i know that and i copy it to :
windows(what_so_ever)/system
windows(what_so_ever)/system32
and thats before you say so and didnt work ??
|

May 14th, 2003, 09:31 AM
|
 |
Contributing User
|
|
Join Date: Jan 2003
Location: USA
|
|
Quote: Originally posted by linux juggler
i know that and i copy it to :
windows(what_so_ever)/system
windows(what_so_ever)/system32
and thats before you say so and didnt work ?? |
Sorry, I mistyped. I meant to say:
See if your XP has a \WINNT\SYSTEM directory or something similar that has lots of .DLL files in it. That should be the place.
In your reply, did you mean to say that you had tried \WINNT?
Sorry for the misunderstanding.
|

May 14th, 2003, 12:42 PM
|
|
Linux World Forum Admin
|
|
Join Date: Feb 2003
Location: Linux Worlds
Posts: 53
Time spent in forums: 3 h 42 m 25 sec
Reputation Power: 11
|
|
|
in windows XP system directory is :
windows/system32
windows/system
i put the file there but still not working
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|