【原创分享】fluent成功加载udf编译器的方式(非环境变量更改方式)
2016-11-30 by:CAE仿真在线 来源:互联网
电脑配置:win7 64bit
经常有同学在用fluent编译UDF时出现“nmake不是内部或外部命令”的问题,笔者分享一个解决方案,已测试五台电脑/工作站,成功解决。
我对比了两台主机上的环境变量Path、lib以及include之后发现可以正常运行udf的旧的电脑A与新的服务器B之间的差别,发现Path等并没有太多异常,甚至A上几乎没有添加环境变量。于是采用下方案
从Microsoft官网下载软件开发补丁:NET Framework 2.0 Software Development Kit (SDK) (x64)
安装补丁
从开始快捷键中以管理员身份运行“SDK”命令行,SDK Command Prompt
命令行中切换至fluent 启动项位置,运行fluent
切换fluent工作目录至case 目录,运行。
udf 可以成功运行
——————————————————
随后,删除了libudf之后 以正常方式打开case之后仍然失败。
不删除libudf,正常方式打开case之后成功。
因此推断,在编译过程中有点问题,可能还是VS与fluent 之间配合不好。在编译完成之后udf即可正常运行。
附SDK 中 fluent打开方式
附录参考方案来源
How can I manage to compile my UDF with Windows 7 64bit?
This problem sometimes looks similar to the one concerning the missing ‘nmake’.
-
Install Visual Studio. Most of the time the Visual C++ 2008 Express Edition [3] is recommended. On my system it even works with the new Visual Studio 2010 Professional Release Candidate [4].
-
Set the correct environment variables. Browse your way through the Windows system control to ‘System’. There you will find a section ‘Advanced system settings’. In the following dialog go to the ‘Advanced’ tabulator and click on ‘Environment variables’ (lower right corner). Go through the ‘System variables’ list and search for the ‘Path’ entry. Add the following to the variable: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin;C:\Program Files\ANSYS Inc\v120\fluent\ntbin\win64. Adjust this entry to your system concerning the installation directories! The Visual Studio entry should point to the location where ‘nmake’ is located.
-
Install a Software Development Kit (SKD) for 64bit systems. This may be the difference between 32bit and 64bit systems. I have used the .NET Framework 2.0 Software Development Kit (SDK) (x64) from 2006[5] because it is explicitly for 64bit systems and I was not sure if more recent versions are for 64bit systems as well.
-
Start FLUENT from the SDK command prompt. Do not use the Visual Studio command prompt, use the SDK command prompt! Go to the directory your case is in and type ‘fluent’
相关标签搜索:【原创分享】fluent成功加载udf编译器的方式(非环境变量更改方式) Fluent培训 Fluent流体培训 Fluent软件培训 fluent技术教程 fluent在线视频教程 fluent资料下载 fluent分析理论 fluent化学反应 fluent软件下载 UDF编程代做 Fluent、CFX流体分析 HFSS电磁分析