Fortran Coder

CMAKE安装Plplot

查看数: 6638 | 评论数: 2 | 收藏 0
关灯 | 提示:支持键盘翻页<-左 右->
    组图打开中,请稍候......
wdy
发布时间: 2018-4-17 09:57

正文摘要:

大家有用fortran画图吗? 下面是一种解决方案,用到的软件是Plplot,但是需要先安装Cmake,安装过程中出错。 用的是intel visual fortran 2013,win10系统, 在Compilers->Fortran下寻找编译器,在ivf的安装目 ...

回复

wdy 发表于 2018-4-18 11:24:35
wdy 发表于 2018-4-18 11:03
下面这段是从Plplot源目录bindings\fortran\Cmakelists.txt文件中摘录的:

if(ENABLE_fortran)

将Plplot版本换成5.10.0就可以顺利generate了,看来是版本的问题
wdy 发表于 2018-4-18 11:03:09
本帖最后由 wdy 于 2018-4-18 11:05 编辑

下面这段是从Plplot源目录bindings\fortran\Cmakelists.txt文件中摘录的:

if(ENABLE_fortran)

if(CMAKE_Fortran_COMPILER MATCHES "gfortran")
    message (STATUS
      "WARNING concerning spurious warning messages generated by the gfortran compiler.
   The new Fortran binding is known to generate some ~50 \"marked
   PRIVATE\" warning messages when building the plplotfortran target with the
   gfortran Fortran compiler.  A typical example of such a warning
   message is

   Warning: Symbol 'interface_plcont' at (1) is marked PRIVATE but has been given the binding label 'c_plcont'

   It appears these warnings (which do not occur if using the ifort or
   nagfor Fortran compilers) are due to a gfortran bug (see
   <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49111> and
   <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64861>), i.e., they
   are spurious warnings concerning completely valid use of the
   private attribute for interface blocks describing C routines.
   There appear to be no known negative consequences of this gfortran
   bug other than the spurious warnings themselves.  Until this gfortran
   bug is fixed, these ~50 \"marked PRIVATE\" warnings should just be
   ignored for those using gfortran."
     )
  endif(CMAKE_Fortran_COMPILER MATCHES "gfortran")
  
# Set the include path
  include_directories(
    ${CMAKE_SOURCE_DIR}/include
    ${CMAKE_SOURCE_DIR}/lib/qsastime
    ${CMAKE_BINARY_DIR}
    ${CMAKE_BINARY_DIR}/include
    ${CMAKE_CURRENT_SOURCE_DIR}
    ${CMAKE_CURRENT_BINARY_DIR}
    )

  ## Build C part of Fortran bindings
  if(WIN32_OR_CYGWIN)
    # Set the flags for the C compiler. The C stubs need to have the
    # correct case and calling convention for the Fortran compiler
    IF(TARGET_FORTRAN MATCHES "IVF")
      SET(DEFFILE "_ifort")
      SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /DIVF")
    ELSEIF(TARGET_FORTRAN MATCHES "CVF")
      SET(DEFFILE "")
      SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /DCVF")
    ENDIF(TARGET_FORTRAN MATCHES "IVF")
  endif(WIN32_OR_CYGWIN)

这段代码似乎是针对gfortran编译器的,接下来提到的ivf也是包含在if(win32)条件语句中,是不是只能用32位的编译器?下载的Plplot版本是最新的5.13.0,不应该是这样的啊~~!

捐赠本站|Archiver|关于我们 About Us|小黑屋|Fcode ( 京ICP备18005632-2号 )

GMT+8, 2024-5-8 22:54

Powered by Tencent X3.4

© 2013-2024 Tencent

快速回复 返回顶部 返回列表