以文本方式查看主题 - Fortran中文网 (http://fortran.cn/bbs/index.asp) -- Fortran语言使用经验交流 (http://fortran.cn/bbs/list.asp?boardid=2) ---- fortran画图的一个问题 (http://fortran.cn/bbs/dispbbs.asp?boardid=2&id=2750) |
-- 作者:saviorggg -- 发布时间:2012/6/30 0:54:56 -- fortran画图的一个问题 使用fortran画图,遇到一个不知怎么解决的问题: 编辑好程序代码如下, module sgl_util use sgl implicit none contains subroutine Display() write(*,*) "Update" call sglClearBuffer() ! 清除画面 call sglColor3f(1.0,0,0) ! 使用红色 call sglRect(100,100,300,300) ! 以(100,100)和(300,300)为端画矩形 call sglColor3i(0,255,0) ! 使用绿色 call sglCircle(200,200,200) ! 以(200,200)为圆心, 画半径为200的圆 call sglColor3i(0,0,255) ! 使用蓝色 call sglLine(200,0, 200,400) ! 在(200,0)到(200,400)两点间画线 call sglLine(0,200, 400,200) ! 在(0,200)到(400,200)两点间画线 end subroutine end module program main use sgl_util implicit none call sglDisplaySub(Display) ! 设定窗口更新时调用Display ! 打开绘图窗口, 左上角为(100,100), 宽高同为400 call sglCreateWindow(100,100,400,400,0) ! 进入等待信息的循环 call sglMainLoop() stop end program 同时分别添加了sgl.lib和sgl.mod到编译器的Library Files和Include Files文件搜索目录下,但是编译后出现这样的错误: error FOR1533: bad module file format Error executing fl32.exe. 请问这是什么错误,怎样引起的?很有可能是添加sgl.lib和sgl.mod到编译器的Library Files和Include Files文件搜索目录下时出现的问题,具体该怎么操作?谢谢! |