【发布时间】:2019-02-21 11:26:43
【问题描述】:
我找不到任何关于如何设置 Code::Blocks 来运行 plplot 的文档。我已经在 /home/myname/plplot 中安装了 plplot 5.14.0 版。我按照https://sourceforge.net/p/plplot/wiki/Linux/ 的说明进行编译。进展顺利,我在 plplot 文件夹中有一个 build_directory 和 install_directory 文件夹。我正在运行 Ubuntu 18.04。
在Code::Blocks中编译示例程序时,不知道需要在Project->Build Options中添加哪些文件或文件夹。错误消息显示:致命错误:无法在 (1) 处打开模块文件“plplot.mod”进行读取:没有这样的文件或目录
这是我正在尝试编译的示例:
program ft_x00f
! This is a modified version of x00f.f90
! which was written by Alan Irwin
use plplot
implicit none
integer, parameter :: NSIZE = 100
real(kind=plflt), dimension(0:NSIZE) :: x, y
real(kind=plflt) :: xmin = 0.0_plflt, &
xmax = 1.0_plflt, &
ymin = 0.0_plflt, &
ymax = 100.0_plflt
integer :: i
! Prepare data to be plotted.
! x = .00, .01, .02, ..., .99, 1.00
x = [(i, i=0,NSIZE)] / real(NSIZE)
y = ymax * x**2
! Parse and process command line arguments
call plparseopts( PL_PARSE_FULL )
! Initialize plplot
call plinit( )
! Create a labelled box to hold the plot.
call plenv( xmin, xmax, ymin, ymax, just=0, axis=0 )
call pllab( "x", "y=100 x#u2#d", &
"Simple PLplot demo of a 2D line plot" )
! Plot the data that was prepared above.
call plline( x, y )
! Close PLplot library
call plend( )
end program ft_x00f
【问题讨论】:
标签: codeblocks