'nmake' is not recognized as an internal or external command ...
hi everybody,
I have some problem with compiling my udf. I didn't work before with udfs. I searched the forum for my problem but I cannot solve it. when I want to build my udf the this error apears: Code:
Deleted old libudf\ntx86\2d\libudf.dll Is anybody here that can help me?!?!?!? what should I do??? |
OK! I solved it.:cool:
I Installed the VS and ran the Fluent in its command prompt. |
Hello!!!
I am facing the same problem that you used to!! And this is exactely what I wanted to ask in this forum! Can you help me please because I don't know what is VS ? And what is the method to run Fluent in its command prompt? Thank you very much for your help! Samia |
Thanks for your answer!
Well, I am using CVI in order to write the UDF, from the National Instrument, and it seems that the compiler is in the package. I searched "manage environment variable windows" and I openned the window path variables and there is nothing called nmake.exe or even nmake. So I have to create the nmake.exe as a path variable? |
It seems that CVI don't ship a Makefile-capable utility like "nmake.exe". You have to install MSVC in order to compile your UDF under Win* environment. There is a work-around that to compile the library manually instead of invoking the Makefile, but to install MSVC is simpler. You can use "interpreted UDF" instead if there is no restriction to do that in your UDF.
|
Also, if you are using Windows 7 64-bit you may also need to download SDK for Windows 7 and launch fluent from the SDK command prompt (as i had to).
http://www.cfd-online.com/Wiki/Fluen...at_is_wrong.3F |
Well thank you very much I will try to do that !
|
|
Hello All,
I want to do analysis of heat transfer from water flowing through pipes submerged inside concrete. I am modelling in GAMBIT and wish to analyse it on Ansys FLUENT. Can anybody help me out, how to model and simulate? Does any tutorials exist? |
Quote:
Hi Blackmask, I know it is an old thread, but may I ask you where should I add nmake.exe? should I just typeit in the path? could you please elaborate how to set the path variable?. I'm new to this thing and totally lost. Your help is appreciated. Regards Oula |
Quote:
Google environmental variables in windows. In win7 and before, right click on computer and go to properties, advanced system settings, environmental variables. Then in either user variables you should find PATH. Add your path to this variable. |
Quote:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools; C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bi n\Hostx64\x64;C:\Program Files\ANSYS Inc\v182\fluent\ntbin\win64 Regards Oula |
Quote:
add whatever is the directory where your nmake is located. |
Hello~
I have encountered the same problem regarding nmake. Adding it to the windows environment variables path and running Fluent without command prompt gave me another error (Fatal Error C1083). After some searching, I managed to solve it and now UDFs can be compiled without running from command prompt! So I wanted to share my steps to hopefully help others: 1) Install Visual Studio (version 2019 for me) 2) Go to "C:\Program Files (x86)\Microsoft Visual Studio\2019" and type in the search bar "nmake" to find where nmake is located. For me, it's located in "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\bi n\Hostx64\x64". This is your nmake location. 3) Go to Control Panel->Settings->System Settings->Environment Variables->System Variables and find "Path", then click on "Modify" 4) Click "new" and add your nmake location to the path. Then click ok. 5) Open Fluent, open a Fluid Flow (Fluent) component, and right click on "Setup" -> Edit. Click "+Show more Options", then go to "Environment". Copy the udf.bat location (for me it's "C:\Program Files\ANSYS Inc\v182\fluent/ntbin\win64/") and paste it in the explorer to open it. 6) Right click on "udf.bat"->Open with Notepad++ (as administrator). 7) Paste the following text (but make sure the folder paths and VS version are correct for your own computer). Careful to paste the following texts in their appropriate locations: Paste this text before "echo "No MSVC compiler detected!"" echo trying to find MS C compiler, version 19.... set MSVC_DEFAULT=%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build if exist "%MSVC_DEFAULT%\vcvarsall.bat" set MSVC=%MSVC_DEFAULT% if not "%MSVC%" == "" goto msvc_env19 and further below you paste this text before ":ms_c_end": :msvc_env19 set MSVC_VERSION=19 call "%MSVC%\vcvarsall.bat" x86_amd64 goto ms_c_end 8) Save the udf.bat file, and restart Fluent. Now you should be able to directly compile codes without any problems and without having to run through command prompt :) |
LINK : fatal error LNK1104: cannot open file 'kernel32.lib'
Got this error when i followed the steps. Any one got this error?
|
Got the answer!
I wanted to answer my own question if someone is facing this issue. The solution provided in this link worked for me. Need to create a LIB system variable and copy the path where Kernel32.lib is present
|
Quote:
In all fairness, I see this problem has been around since quite a long time and sadly ANSYS hasn't done anything about it despite tons of complaints. A more simplified and robust compiler should do, but alas it seems they simply don't want to bother. |
Quote:
Have you found any alternative to this? please give suggestions. The alternative solution i found is to install an Oracle virtual box with windows 7 and run fluent through that. |
Quote:
|
All times are GMT -4. The time now is 19:26. |