#1
  1. No Profile Picture
    Linux World Forum Admin
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Location
    Linux Worlds
    Posts
    53
    Rep Power
    12

    Unhappy 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.
  2. #2
  3. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,638
    Rep Power
    4247
    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/efg2lab...deployment.htm for more.
  4. #3
  5. Contributing User
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jan 2003
    Location
    USA
    Posts
    7,172
    Rep Power
    2222
    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.
  6. #4
  7. No Profile Picture
    Linux World Forum Admin
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Location
    Linux Worlds
    Posts
    53
    Rep Power
    12
    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
  8. #5
  9. Contributing User
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jan 2003
    Location
    USA
    Posts
    7,172
    Rep Power
    2222
    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.
  10. #6
  11. No Profile Picture
    Linux World Forum Admin
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Location
    Linux Worlds
    Posts
    53
    Rep Power
    12

    Unhappy


    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 ??
  12. #7
  13. Contributing User
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jan 2003
    Location
    USA
    Posts
    7,172
    Rep Power
    2222
    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.
  14. #8
  15. No Profile Picture
    Linux World Forum Admin
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Location
    Linux Worlds
    Posts
    53
    Rep Power
    12
    in windows XP system directory is :
    windows/system32
    windows/system

    i put the file there but still not working

IMN logo majestic logo threadwatch logo seochat tools logo