0

I was trying to make make command for a code in the remote computer.I found there is a problem and refuse to complete compiling. I need to get the logic of thinking on how to know the problem and solve it.

-bash-4.1$ vi Makefile 
-bash-4.1$ make
gfortran -cpp -O -ffpe-trap=invalid,zero,overflow -fbounds-check -mcmodel=medium -fopenmp fiscof2.f90 frames.f90 gdfxs.f90 -o fiscof2 -L. -lfis2 -L/home/gouda/lib/ -lfrNOX -lgdfr -lgdf 
/usr/bin/ld: cannot find -lgdf
collect2: ld はステータス 1 で終了しました  (means:ld terminated with status 1)
make: *** [fiscof2] エラー 1  ( means: ERROR 1)
1
  • 1
    You can get output in English if you add LANG=C before a command. Like LANG=C make.
    – Pilot6
    Jul 26, 2016 at 16:11

1 Answer 1

2

The development package of library gdf (entered as an argument of -l linker option) could not be found in your environment. Install it by running:

sudo apt-get install libgdf-dev

Library package names are usually prefixed with lib and postfixed with -dev. Keep this in mind when a similar error appears.

6
  • gdf is found in my code and I already compile it before compiling my code/ I think there is another reason but I can't understand it Jul 26, 2016 at 16:17
  • Have you installed it to a standard location (/usr/lib, /usr/local/lib), so it’s available to the linker?
    – Melebius
    Jul 26, 2016 at 16:19
  • I compile it inside the remote computer. that mean inside the same path and I transfer the executable file to bin directory Jul 26, 2016 at 16:22
  • This is probably not sufficient but sudo make install in the build directory should make the job. A library in Linux is a *.so file (or a set of them) and should be placed in one of the mentioned locations.
    – Melebius
    Jul 26, 2016 at 16:23
  • I just running everything according to specific sequence related to this code. the gdf library is not that one in sudo ( I mean not general library, it is specific library) with my code Jul 26, 2016 at 16:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .