Fortran Coder

查看: 1690|回复: 13
打印 上一主题 下一主题

[讨论] 两个静态库重复定义造成冲突如何解决?

[复制链接]

130

帖子

10

主题

0

精华

大师

F 币
617 元
贡献
372 点

贡献勋章管理勋章帅哥勋章元老勋章星光勋章规矩勋章

楼主
发表于 2023-9-23 20:17:30 | 显示全部楼层
DISLIN: (LINE) -> (STRTPT, STRTPT)
or
SimplyFortran, AppGraphics: (line) -> (moveto, lineto)

======================================================================                                             
DISLIN: (LINE) -> (STRTPT, STRTPT)                                                                                 
======================================================================                                             
                                                                                                                    
L I N E                                                                                                            
                                                                                                                    
LINE joins two points with a line.                                                                                 
Different line styles can be used.                                                                                 
                                                                                                                    
The call is:    CALL LINE (X1, Y1, X2, Y2)      level 1, 2, 3                                                      
                                                                                                                    
X1, Y1  are real numbers containing the plot coordinates of the first point.                                       
X2, Y2  are real numbers containing the plot coordinates of the second point.                                       
                                                                                                                    
----------------------------------------                                                                           
                                                                                                                    
XMOVE and XDRAW are simple subroutines for plotting lines.                                                         
Different line styles can be used.                                                                                 
                                                                                                                    
The calls are:  CALL STRTPT (X, Y)      level 1, 2, 3                                                               
                CALL CONNPT (X, Y)      level 1, 2, 3                                                               
                                                                                                                    
X, Y    are real numbers containing the plot coordinates.                                                           
                                                                                                                    
======================================================================                                             
SimplyFortran, AppGraphics: (line) -> (moveto, lineto)                                                              
======================================================================                                             
                                                                                                                    
line                                                                                                               
                                                                                                                    
Fortran subroutine line (x1, y1, x2, y2)                                                                           
                                                                                                                    
Description                                                                                                         
Draws a line using the current color from point (x1,y1) to point (x2,y2).                                          
                                                                                                                    
Parameters                                                                                                         
Parameter       Fortran Type    Description                                                                        
x1              integer         Horizontal coordinate of the start point of the line                                
y1              integer         Vertical coordinate of the start point of the line                                 
x2              integer         Horizontal coordinate of the end point of the line                                 
y2              integer         Vertical coordinate of the end point of the line                                    
                                                                                                                    
----------------------------------------                                                                           
                                                                                                                    
moveto                                                                                                              
Fortran subroutine moveto (x, y)                                                                                    
                                                                                                                    
Description                                                                                                         
Sets the current position to be used with subsequent relative graphics operations.                                 
                                                                                                                    
Parameters                                                                                                         
Parameter       Fortran Type    Description                                                                        
x               integer         Horizontal coordinate of the current position                                       
y               integer         Vertical coordinate of the current position                                         
                                                                                                                    
--------------------                                                                                                
                                                                                                                    
lineto                                                                                                              
                                                                                                                    
Fortran subroutine lineto (x, y)                                                                                    
                                                                                                                    
Description                                                                                                         
Draws a line from the current position to the point (x, y) using the current color.                                 
The current position is moved to this new offset after the drawing operation.                                       
                                                                                                                    
Parameters                                                                                                         
Parameter       Fortran Type    Description                                                                        
x               integer         Horizontal coordinate of the end point of the line                                 
y               integer         Vertical coordinate of the end point of the line                                    
                                                                                                                    

130

帖子

10

主题

0

精华

大师

F 币
617 元
贡献
372 点

贡献勋章管理勋章帅哥勋章元老勋章星光勋章规矩勋章

沙发
发表于 2023-9-25 10:13:35 | 显示全部楼层
weixing1531 发表于 2023-9-25 10:03
用相同功能函数代替还是不行

請告知 "錯誤訊息"

130

帖子

10

主题

0

精华

大师

F 币
617 元
贡献
372 点

贡献勋章管理勋章帅哥勋章元老勋章星光勋章规矩勋章

板凳
发表于 2023-9-25 11:01:14 | 显示全部楼层
1. "LINE" 在DISLIN中為"EXTERNAL" subroutine,  在AppGraphics中應該也是
2. 如果都是"MODULE" subroutines, li913的作法OK
3. 如果 錯誤訊息 仍是 multiple definition of `line', 請確認:你的程式中 所有的 "LINE"calls 均已做替換
    DISLIN: (LINE) -> (STRTPT, CONNPT)      
    AppGraphics: (line) -> (moveto, lineto)

130

帖子

10

主题

0

精华

大师

F 币
617 元
贡献
372 点

贡献勋章管理勋章帅哥勋章元老勋章星光勋章规矩勋章

地板
发表于 2023-9-28 10:05:09 | 显示全部楼层
1. 你 "自己的source", 所有的 LINE calls 均已做替換[ (STRTPT, CONNPT) , (moveto, lineto)] , link時就不會   
    有 multiple definition of "LINE"的問題
2.  低階[ (STRTPT, CONNPT) , (moveto, lineto)] 是不會再referenc 高階[LINE] 的
3.  有 不是"自己的source", i.e., 第三方OBJ? 參與 link?
4. LINE不是唯一的問題?
4. 請你描述一下, 為何一個 PROGRAM/SUBRRIGRAM/PLOT 用到兩個不兼容ˊ的graphics linraries
5. 兩座大山難移, 登山之路前有古人後有來者

130

帖子

10

主题

0

精华

大师

F 币
617 元
贡献
372 点

贡献勋章管理勋章帅哥勋章元老勋章星光勋章规矩勋章

5#
发表于 2023-9-28 12:22:21 | 显示全部楼层
CALL SYSTEM("Dislin库画图")是否可行?
您需要登录后才可以回帖 登录 | 极速注册

本版积分规则

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

GMT+8, 2024-5-13 10:43

Powered by Tencent X3.4

© 2013-2024 Tencent

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