Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

linkng libraries

rwgreenwood
Beginner
299 Views
I have been trying to link the psplot graphics library when compiling some fortran code, using the command
>g77 box+.for -o box+.exe -lpsplot
but I keep getting the message
>ld: library not found for -lpsplot
I have set the PATH to include the usr/local/lib directory where the libpsplot.a file resides, so I can't fathom what the problem is. Any ideas out there - am I missing something ridiculously simple?
I am new to MAC OS X, but have previously run this code with no problem under DOS/Windows, so am somewhat frustrated ...
grateful for any help
Richard
0 Kudos
1 Reply
mecej4
Honored Contributor III
299 Views
G77 is obsolete. This is the Intel Fortran Forum.

PATH is for locating executable files. You need to use the option -L /usr/local/lib to have the linker search for libraries in that location. Alternatively, provide a symlink to libpsplot.a in the expected place.
0 Kudos
Reply