找回密码
 注册
Simdroid-非首页
查看: 156|回复: 5

[子程序/二次开发] LINK : fatal error LNK1181: 无法打开输入文件“ws2_32.lib”

[复制链接]
发表于 2012-3-12 22:01:21 | 显示全部楼层 |阅读模式 来自 广东广州
悬赏3仿真币未解决
LINK : fatal error LNK1181: 无法打开输入文件“ws2_32.lib”

在使用Marc进行导入子程序计算时,出现上述错误,我的MSC.MARC是2010版的,装的是Intel Fortran 11.0-061,使用的编译器是Microsoft Visual Studio 9.0

子程序代码是:
      subroutine forcem(press,th1,th2,nn,n)
c
      implicit real*8 (a-h,o-z)
c
c     ** Start of generated type statements **
c     ** End of generated type statements **
c* * * * * *
c
c     defined non-uniformed distributed force on an element.
c
c   If NOT table driven input style:
c     press        distributed load increment magnitude
c                  if follower force then give total magnitude at the end of increment
c   If table driven input style:
c     press        total distributed load magnitude at the end of increment
c---------------------
c   2D analyis
c
c     th1          1st component of the integration point coordinate
c     th2          2nd component of the integration point coordinate
c---------------------
c   3D analyis
c
c     th1          x,y,z coordinte of the integration point
c     th2          direction vector of the pressure
c---------------------
c   2D and 3D analysis
c     nn           integration point number (for distributed load analysis)
c     n(1)         user element number
c     n(2)         parameter identifying the type of load
c     n(3)         not used
c     n(4)         not used
c     n(5)         distributed load index for non-table driven input style
c                  it can be used to indentify which loads is being process
c                  in case of multiple DIST LOADS definition in the model
c     n(6)         not used
c     n(7)         internal element number
c     n(8)         not used
c     n(9)         0= not general CID load flag
c                  1= general CID load flag
c     n(10)        not used
c     cdum         not used
c     bcname       boundary condition name for table driven input style
c                  it can be used to indentify which loads is being process
c                  in case of multiple DIST LOADS definition in the model
c     prnorm       direction cosine of the direction of the load
c                  with respect to the global system.
c                  It has to be set for general CID traction load,
c                  nonuniform volumetric load (IBODY=107),
c                  nonuniform force per unit length (IBODY=111) or
c                  nonuniform for per unit area (IBODY=113
c* * * * * *
      dimension th1(3),th2(3),n(7)
include 'H:\MSC.Software\Marc\2010\marc2010\common\creeps'
c
      b=1.0d0
      v=sqrt(2.0d0)
      distan=v*(cptim+timinc)
      xc=0.5d0*sqrt(2.0d0)*distan
      yc=0.5d0*sqrt(2.0d0)*distan
      xmin=xc-b/2.0d0
      xmax=xc+b/2.0d0
      ymin=yc-b/2.0d0
      ymax=yc+b/2.0d0
      press=0.0d0
      if (th1(1).le.xmax.and.th1(1).ge.xmin.and.
     $    th1(2).le.ymax.and.th1(2).ge.ymin) press=2.0d0
      th2(1)=0.0d0
      th2(2)=0.0d0
      th2(3)=-1.0d0
c
      return
      end


请论坛内的高手们鼎力相助吖!

发表于 2012-3-13 16:30:10 | 显示全部楼层 来自 四川成都
Simdroid开发平台
兄弟,你好!我最近就因为marc的二次开发环境配置搞得焦头烂额。我的情况是这样的:我的电脑是Windows 7 家庭高级版,64位操作系统;按照顺序依次安装了:Microsoft Visual Studio 2005 SP1及插件(使其能在win7上运行)、Intel(R) Fortran Compiler 11.0.061,这两个软件都默认安装到了C:\Program Files (x86)\内,最后在E:\MSC.Software\下安装了marc。
接下来这个环境变量怎么设置呢?虽然我下载了相关资料,设置了相应的环境变量,但就是调不通。我该怎么做?还请大侠指教。
环境变量设置完后,还有64位环境下的设置(在visual studio里面),这调不成功!
回复

使用道具 举报

 楼主| 发表于 2012-3-13 20:20:25 | 显示全部楼层 来自 广东广州
64位我不清楚,我的问题我自己是解决了...
回复

使用道具 举报

发表于 2012-4-19 17:13:30 | 显示全部楼层 来自 湖南湘潭
我也遇到了跟楼主相似的问题啊,LINK:fatal error link1181:无法打开输入文件wsock32.lib
请问楼主或路过的大神们,你们是怎么解决的呢?
回复

使用道具 举报

发表于 2012-7-2 12:44:42 | 显示全部楼层 来自 山东济宁
在系统变量LIB中添加C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Lib,重新启动就可以了
如果还有那个文件无法打开,添加它所在的目录即可
回复

使用道具 举报

发表于 2012-7-2 20:07:31 | 显示全部楼层 来自 陕西西安
应该是连接设置有问题,参考这个帖子http://forum.simwe.com/forum.php ... 0%E7%A8%8B%E5%BA%8F
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|小黑屋|联系我们|仿真互动网 ( 京ICP备15048925号-7 )

GMT+8, 2024-4-27 19:16 , Processed in 0.039339 second(s), 9 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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