Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting LD_LIBRARY_PATH in Cygwin

Tags:

path

cygwin

I am following the tutorial : http://java.sun.com/developer/onlineTraining/Programming/JDCBook/jniexamp.html

when I reach the part where I am supposed to set the library path :

Unix or Linux:

LD_LIBRARY_PATH=`pwd`
export LD_LIBRARY_PATH

Windows NT/2000/95:

set PATH=%path%;

Neither of these work in cygwin. I keep getting an error when trying to run my program.

like image 531
Farzad Towhidi Avatar asked Mar 06 '11 05:03

Farzad Towhidi


1 Answers

Cygwin doesn't use LD_LIBRARY_PATH, it looks for shared libraries in PATH, so try:

export PATH=`pwd`:$PATH

That will add the current directory to the front of the PATH.

like image 89
Jonathan Wakely Avatar answered Oct 21 '22 16:10

Jonathan Wakely