将英特尔 Fortran 与 Microsoft Visual Studio 和 ANSYS Autodyn 连接起来 [英] Linking Intel Fortran with Microsoft Visual Studio and ANSYS Autodyn

查看:43
本文介绍了将英特尔 Fortran 与 Microsoft Visual Studio 和 ANSYS Autodyn 连接起来的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 ANSYS Autodyn 19.3 版中编写用户子程序.执行此操作的要求是 Visual Studio 2017 和 Intel Fortran 17.0.4 版.我无法访问这个旧版本的 Intel Fortran,但我下载了具有 Fortran 编译器的新 Intel oneAPI.

I am trying to write a user subroutine in ANSYS Autodyn version 19.3. The requirements to do this are Visual Studio 2017 and Intel Fortran version 17.0.4. I can't access this older version of Intel Fortran, but I downloaded the new Intel oneAPI which has a Fortran compiler.

我没有更改任何环境变量或路径,我只是安装了 Visual Studio 和 intel fortran,并在安装过程中将它们集成在一起.

I haven't changed any environment variables or paths, I simply installed both visual studio and intel fortran, and during the installation they integrated together.

当我在 Visual Studio 中构建我的解决方案时,我会附上构建日志.它说它已成功构建,但我收到 219 个 LNK4099 错误.

When I build my solution in Visual Studio, I get the build log attached. It says that it was built successfully but i get 219 LNK4099 errors.

Buildlog1Buildlog2Buildlog3Buildlog4

1>ad_usrsub - 0 error(s), 219 warning(s)
========== Build: 2 succeeded, 0 failed, 0 skipped ==========

我想知道这是否导致输出的可执行文件无法正确运行?

I was wondering if this is causing the outputted executable to not run correctly?

当我在 ANSYS Autodyn 中运行可执行文件时,没有任何反应让我认为这些警告正在起作用.

When I run the executable in ANSYS Autodyn nothing happens which makes me think that these warnings are having an effect.

如果有人能帮助我,我将不胜感激.

If someone could help me out I'd really appreciate it.

谢谢

推荐答案

警告对执行没有影响.它们出现是因为您的链接选项/PDB 告诉链接器查找不存在的调试信息文件.您的屏幕截图截断了行,但我猜想您的编译命令指定将 PDB(程序数据库)文件放在其他地方.默认是在目标文件中包含该信息,但链接器在那里也找不到它.

The warnings have no effect on execution. They appear because your link option /PDB told the linker to look for debug information files that were not there. Your screenshots truncate the lines, but I'd guess that your compile commands specified to place the PDB (Program Database) files somewhere else. The default is to include that information in the object file, but the linker couldn't find it there either.

唯一的伤害是调试应用程序的能力.

The only thing this hurts is the ability to debug the application.

如果您展示了完整的编译和链接命令,我或许可以提供更多建议.如果您的编译命令有/Zi,请将其删除,并从链接中删除/PDB 选项.如果您不能这样做,请调整链接器/PDB 选项以指向编译器放置 .pdb 文件的文件夹(我认为与 .obj 文件相同.)

If you had shown the complete compile and link commands, I might be able to offer more advice. If your compile command has /Zi, remove it, and also remove the /PDB option from linking. If you can't do that, adjust the linker /PDB option to point to the folder where the compiler placed the .pdb files (same as the .obj files, I think.)

这篇关于将英特尔 Fortran 与 Microsoft Visual Studio 和 ANSYS Autodyn 连接起来的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆