link against a legacy library: -lgfortranbegin from a premade makefile

北慕城南 提交于 2021-01-20 13:45:41

问题


I got some trouble trying to compile a programm developed by some researcher supposed to compute in a very precise way fourier transform and some other useful operation scientific paper here, whereas all the files needed and the makefile are provided.

I use gcc and a version of ubuntu available on windows10 (18.04), so, I linked all the librabries needed by the program and called in the pre-made makefile (fftw, lapack, gfortran..) everything is ok untill here, but once I tried to compile I got the error message:

/usr/bin/ld: cannot find -lgfortranbegin
collect2: error: ld returned 1 exit status
Makefile:38: recipe for target 'furian_main' failed
make: *** [furian_main] Error 1

After a few research it appears that libfortranbegin is a legacy code and no more available(source: here ) ..

So my question is: is it possible for me to compile my program without this legacy library (somme people say that we could get rid off this library, but I didn't understand what they do .. here) Or should I do some update or use another library ?

Thank you for your time and consideration :)


回答1:


The usual way of solving this is the following one:

  • remove the -lgfortranbegin
  • check the new link errors and look at what source file from the original source code implemented this feature
  • add this source file to your repository and your build and go back to step 2.

Be aware that it may still not work in the end, but hopefully you will be able to have the missing symbols.



来源:https://stackoverflow.com/questions/53005003/link-against-a-legacy-library-lgfortranbegin-from-a-premade-makefile

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!