最近安装了simply Fortran,看见帮助文档里面有appGraphics,就想学学做界面,但是按照help文档里的例子做,却提示出错
程序:
[Fortran] 纯文本查看 复制代码 program main
use appgraphics
implicit none
integer::myscreen
integer :: root_menu,file_menu,item
interface
subroutine quit()
end subroutine quit
end interface
interface
subroutine save()
end subroutine save
end interface
myscreen = initwindow(800, 600, closeflag=.TRUE.)
call loop()
root_menu = addmenu("", MENU_FOR_WINDOW)
file_menu = addmenu("File", root_menu)
item = addmenuitem("Save", file_menu, save)
item = addmenuitem("Quit", file_menu, quit)
call closewindow(myscreen)
end program main
错误提示:
Generating Makefile... Okay
==============================================================================
Processing default resource
Generating graphics.exe
build\main.o: In function `MAIN__':
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C:\Users\fpchi\Fortran\Empty/./main.f90:24: undefined reference to `save_'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C:\Users\fpchi\Fortran\Empty/./main.f90:25: undefined reference to `quit_'
collect2.exe: error: ld returned 1 exit status
Error: Last command making (graphics.exe) returned a bad status
Error: Make execution terminated
* Failed *
请教是什么原因,是需要一些额外的设置么?
|