LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linking libraries. (http://www.linuxquestions.org/questions/linux-newbie-8/linking-libraries-698409/)

Gamma_User 01-19-2009 02:58 PM

Linking libraries.
 
I have a directory with a lot of object fortran 90 files (a library directory). I would like to link them to others files in others directories using just one compiler option, e.g.

gfortran -[command to link] main.f90 -o main.x

Does anybody know the answer?

chutsu 01-19-2009 06:24 PM

I think this website could give you part of the answer.
http://linuxmafia.com/faq/Admin/ld-lib-path.html

Note: It does mention that the solution is harmful, but sometimes you got to do it in order to make things work right?

Anyways I THINK to solve your problem you would have to do this:
$ export LD_LIBRARY_PATH="path_to_where_your_files_are"

But I'm not too sure, I had a similar problem and this solved it.


All times are GMT -5. The time now is 06:51 PM.