|
[Sponsors] | |||||
Windows Environment variables- to solve problems in compiling UDF in Fluent |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
|
#1 |
|
New Member
Samuel
Join Date: Nov 2011
Posts: 12
Rep Power: 3 ![]() |
Problems in compiling UDF in FLUENT:
1.In 'build' progress: 'nmake' is not recognized as an internal or external command... or LINK : fatal error LNK1104 kernel32.lib 2.In 'load' progress: Error code: 193 These problems are due to incorrect setup of Windows Environment variables. After several days' working on this issue, I finally solved them. And I think it is necessary to share my method. Programs: Ansys 13.0, Visual Studio 2008; System:Win 7 (64) Step 1: Find the console of Environment variables---My Computer->Properties->Advanced-> Environment variables Step 2: Change or add three variables below: X:\ means your installation path of VS. I. INCLUDE= X:\Visual Studio\VC\include;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include II. LIB =X:\Visual Studio\VC\lib\amd64;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib\x64 III.Path=X:\Visual Studio\VC\bin\amd64;C:\Program Files (x86)\Microsoft Visual Studio\Common7\IDE PLEASE make sure that you can find every folder in the path above. If not, like Program Files (x86), then try to find it in other folders, like 'Program Files'. (In my computer, there are two folders, namely, C:\Program Files (x86) and C:\Program Files. The folder you want must be in one of them. ) By the way, this is for WIN 7(64). For 32 bits system, just ignore the 'amd64' and 'x64' in the Environment variables. (Without test, but valid ) That's all. I hope this can help. |
|
|
|
|
|
|
|
|
#2 |
|
New Member
Saif Ullah
Join Date: Aug 2011
Posts: 4
Rep Power: 3 ![]() |
Please look into following weblink. I have solved my issues by tips given on this webpage.
http://www.cfd-online.com/Wiki/Fluent_FAQ Regards |
|
|
|
|
|
|
|
|
#3 |
|
New Member
Join Date: May 2009
Posts: 29
Rep Power: 6 ![]() |
I have tried that exactly the same as you have written, it did not work for me. Still I have an error like this, Please help. Appreciate it.
Deleted old libudf\win64\2d\libudf.dll 1 file(s) copied. (system "copy "C:\PROGRA~1\ANSYSI~1\v130\fluent"\fluent13.0.0\sr c\makefile_nt.udf "libudf\win64\2d\makefile" ") 1 file(s) copied. (chdir "libudf")() (chdir "win64\2d")() # Generating ud_io1.h time_step.c # Generating udf_names.c because of makefile time_step.obj udf_names.c # Linking libudf.dll because of makefile user_nt.udf udf_names.obj time_step.obj Microsoft (R) Incremental Linker Version 9.00.30729.01 Copyright (C) Microsoft Corporation. All rights reserved. LINK : fatal error LNK1104: cannot open file 'kernel32.lib' Done. |
|
|
|
|
|
|
|
|
#4 |
|
New Member
Carlos
Join Date: Dec 2011
Posts: 6
Rep Power: 3 ![]() |
Hi everybody!
I have followed the steps suggested in this forum but I have found a concatenation error when I try to load the UDF that I have built. It seems that the UDF has an error in the value of a variable because a part of the file adress is called twice. For this reason, the file cannot be found. Please give me your suggestions Carlos |
|
|
|
|
|
|
|
|
#5 |
|
Senior Member
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 197
Rep Power: 2 ![]() |
@chmurillor
Do you get this error when you launch fluent separately (I mean not from workbench)? |
|
|
|
|
|
|
|
|
#6 |
|
New Member
Carlos
Join Date: Dec 2011
Posts: 6
Rep Power: 3 ![]() |
Hi vasava
Thanks for your reply. This error is evidenced in both cases (with and without workbench) The first image corresponds to workbench and the next image was taken by opening Fluent directly. Do you know if an environment variable has a wrong value? Thanks |
|
|
|
|
|
|
|
|
#7 |
|
Senior Member
Join Date: Aug 2011
Posts: 117
Rep Power: 6 ![]() |
I have a bad sight and can not see the error message clearly. You could unload the library, compile your source files, reload the library, and save your case file. Do not change the path of the case file or the lib afterwards and your should end up fine.
|
|
|
|
|
|
|
|
|
#8 |
|
New Member
Carlos
Join Date: Dec 2011
Posts: 6
Rep Power: 3 ![]() |
No blackmask, the problem is still evidenced. Please, tell me where is the variable that we must modify.
This is the error that we get when we unload and reload the library. The UDF library you are trying to load (D:\vizcayamurillo\amidon\libudf) is not compiled for 3d on the curent platform (win64). The system cannot find the path specified. C:\Program Files\ANSYS Inc\v130\fluent tbin\win64\D:\vizcayamurillo\amidon\libudf\win64\3d\libudf.dl l The red part corresponds to the location of the .bat file and the blue one corresponds to the location of the libudf.dll file |
|
|
|
|
|
|
|
|
#9 |
|
Senior Member
Join Date: Aug 2011
Posts: 117
Rep Power: 6 ![]() |
It seems that the "\n" is interpreted as the newline character in the following string
C:\Program Files\ANSYS Inc\v130\fluent\ntbin\win64\ and a ";" is missing after the final "\". You could check the file named "log" in the same directory as your case file and possibly find what goes wrong. |
|
|
|
|
|
![]() |
| Tags |
| compiling, udf |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| About UDF compiling issues: 'nmake' | Haoyin Shan | Fluent UDF and Scheme Programming | 7 | January 2, 2013 10:49 |
| CFX11 + Fortran compiler ? | Mohan | CFX | 20 | March 30, 2011 18:56 |
| 64bit error compiling UDF : divergence detected | UtoS_99 | FLUENT | 7 | March 29, 2011 03:19 |
| UDF to record FLUENT Solver variables... | mariachi | Fluent UDF and Scheme Programming | 9 | February 19, 2010 12:25 |
| UDF to record FLUENT solver variables... | mariachi | FLUENT | 1 | February 3, 2010 22:18 |