- 积分
- 0
- 注册时间
- 2009-4-8
- 仿真币
-
- 最后登录
- 1970-1-1
|
本帖最后由 xieh05 于 2009-4-8 23:54 编辑
刚拿到相关文件,进行命令行编译时出现问题,由于本人很菜,google了一下午才解决。现总结如下:
======================
nmake的错误:
Intel(R) Fortran Compiler for 32-bit applications, Version 9.1 Build 20060323
Z Package ID: W_FC_P_9.1.024
Copyright (C) 1985-2006 Intel Corporation. All rights reserved.
Fatal error cannot open "LIBC"
ifort: error: problem during multi-file optimization compilation (code 1)
NMAKE : fatal error U1077: 'ifort' : return code '0x1'
===============
原因:
http://blogs.msdn.com/brianjo/archive/2004/06/06/149854.aspx
MSDN Labs: What's New in Visual C++ 2005
The single-threaded CRT libraries, libc.lib, licd.lib, msvcrt.lib, and msvcrtd.lib, have been removed. Use the multi-threaded CRT libraries. The /MD, /ML, /MT, /LD (Use Run-Time Library) compiler flag is no longer supported. Non-locking versions of some functions have been added in cases where the performance difference between the multithreaded code and the single-threaded code is potentially significant.
===============
解决方法:
1、对于.net环境:
解决如下:项目->属性中->配置属性->链接器->输入->在忽略特定库中写入打不开的文件的名称LIBC.lib;
2、对于命令行编译方法:
在ifort后面的/link后面加参数:
/NODEFAULTLIB:libc.lib
或/NODEFAULTLIB:libc.lib
对于nmake来说,可以在makefile里面/link后加参数
(其实拿一个假的libc文件给它也可以)
===============
总的来说,visual studio 2005下对dyna进行二次开发的具体步骤如下:
1、安装Visual Studio 2005,其中包含Platform SDK
2、安装Visual Fortran 9.1或10.0
3、在makefile文件中/link行后面加上/NODEFAULTLIB:libc.lib
4、新建批处理:
@call "C:\Program Files\Microsoft Visual Studio 8\VC\Bin\Vcvars32.bat"
@call "C:\Program Files\Intel\Compiler\Fortran\9.1\IA32\Bin\IFortVars.bat"
@del dyn21.obj
@del dyn21b.obj
nmake /f makefile>compile.log
5、修改f文件加入材料模型
6、运行批处理开始编译
另外请教一个问题,在vs环境下调试umat如何配置?
|
评分
-
1
查看全部评分
-
|