PDA

View Full Version : Mysql LD_LIBRARY_PATH Issue



Think_Positive
13th February 2007, 11:10
I have mysql installed in a non standard location in slackware linux 11.

I also intalled qt-4.1.2 in a non standard location.

I've built mysql support directly into Qt build by passing the mysql include and lib paths in configure.
However, I am unable to actually run any program without setting the LD_LIBRARY_PATH with the mysql lib location, which I do not want to do.

(Note that the LD_LIBRARY_PATH that needs to be set is the same as
passed in configure -L).

Anybody can help me to fix this issue.

Thanks in Advance.

jacek
13th February 2007, 12:09
However, I am unable to actually run any program without setting the LD_LIBRARY_PATH with the mysql lib location, which I do not want to do.
Add that path to /etc/ld.so.conf and run ldconfig.

Think_Positive
13th February 2007, 12:19
Dear jacek Thanks for your help,

I added the path to /etc/ld.so.conf and run the ldconfig it is working.

but I need the soultion for without setting any paths in externally,

But it should be added in qt build time only.

Thanks in Advance.

Think_Positive

jacek
13th February 2007, 20:16
I need the soultion for without setting any paths in externally
You might find -rpath linker option helpful.