在Ubuntu下的CodeBlocks中将gfortran库链接到c ++程序 [英] Linking gfortran libraries to c++ program in CodeBlocks under Ubuntu
问题描述
我在Vmware下有一个Ubuntu,并使用Code :: Blocks,因为我不是一个非常强大的命令行用户
,并且更喜欢IDE到Vim + console。
我试图编译一个使用c ++ wrapper来fortran库的程序。 这种类型的错误很多,而其他类似的错误也很多。 我有gfortran 4.6.3。我发现搜索它可能是一个链接问题,并且人们说 我的猜测类似于/ bin / lib / usr / lib或/ usr / local / lib,只要看看你的文件系统。没有Linuix的工作,也许是其他人? Kim Kulling I have an Ubuntu under Vmware, and use Code::Blocks, as I am not a very powerful command line user
and prefer IDE to Vim+console. I am trying to compile a program which uses a c++ wrapper to fortran library.
However compiling gives me the following errors: There are a lot of errors of this type and a bunch of other similar to this one. I have gfortran 4.6.3. I found searching that it is probably a linking problem, and people say to
use -lgfortran option for linker. When I add this to linker options in the Code::Blocks it does not change anything, errors continue. So, here are some question:
My guess is something like /bin/lib /usr/lib or /usr/local/lib. Just take a look into your filesystem. Unfortunately I do not have a Linuix at work. Maybe someone else? Kim Kulling 这篇关于在Ubuntu下的CodeBlocks中将gfortran库链接到c ++程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
然而编译给了我以下错误:
$ p $ 对`_gfortran_compare_string'的未定义引用
$ c
使用链接器的-lgfortran选项。当我将这添加到Code :: Blocks中的链接器选项时,它不会改变任何内容,错误会继续。所以,这里有一些问题:
undefined reference to `_gfortran_compare_string'