CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

'nmake' is not recognized as an internal or external command ...

Register Blogs Community New Posts Updated Threads Search

Like Tree9Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 27, 2012, 15:54
Default 'nmake' is not recognized as an internal or external command ...
  #1
Senior Member
 
adambarfi's Avatar
 
Mostafa Mahmoudi
Join Date: Jan 2012
Posts: 322
Rep Power: 15
adambarfi is on a distinguished road
Send a message via Yahoo to adambarfi Send a message via Skype™ to adambarfi
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
        1 file(s) copied.
        1 file(s) copied.
(system "copy C:\Fluent.Inc\fluent6.3.26\src\makefile_nt.udf libudf\ntx86\2d\makefile")
        1 file(s) copied.
(chdir "libudf")()
(chdir "ntx86\2d")()
'nmake' is not recognized as an internal or external command,
operable program or batch file.
'nmake' is not recognized as an internal or external command,
operable program or batch file.

Done.
I think this error originates from Env. variables.
Is anybody here that can help me?!?!?!? what should I do???
adambarfi is offline   Reply With Quote

Old   September 28, 2012, 09:13
Default
  #2
Senior Member
 
adambarfi's Avatar
 
Mostafa Mahmoudi
Join Date: Jan 2012
Posts: 322
Rep Power: 15
adambarfi is on a distinguished road
Send a message via Yahoo to adambarfi Send a message via Skype™ to adambarfi
OK! I solved it.
I Installed the VS and ran the Fluent in its command prompt.
chaitanyaarige likes this.
adambarfi is offline   Reply With Quote

Old   October 1, 2012, 02:15
Default
  #3
New Member
 
Join Date: Sep 2012
Posts: 7
Rep Power: 13
oinch is on a distinguished road
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
oinch is offline   Reply With Quote

Old   October 1, 2012, 03:49
Default
  #4
Senior Member
 
Join Date: Aug 2011
Posts: 421
Blog Entries: 1
Rep Power: 21
blackmask will become famous soon enough
VS = (Microsoft) Visual Studio
First you should make sure that you have at least one C compiler installed in your OS, MSVC is a common choice in windows. Then you should make sure that the directory containing "nmake.exe" is in the "Path" variable, otherwise you have to edit the Path manually. Search "manage environment variable windows" for more information.
You don't have to run Fluent from the "Visual Studio Command Prompt" if your path variable is set correctly.
chaitanyaarige likes this.
blackmask is offline   Reply With Quote

Old   October 1, 2012, 08:00
Default
  #5
New Member
 
Join Date: Sep 2012
Posts: 7
Rep Power: 13
oinch is on a distinguished road
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?
ANANDHU R likes this.
oinch is offline   Reply With Quote

Old   October 6, 2012, 03:54
Default
  #6
Senior Member
 
Join Date: Aug 2011
Posts: 421
Blog Entries: 1
Rep Power: 21
blackmask will become famous soon enough
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.
blackmask is offline   Reply With Quote

Old   October 6, 2012, 04:00
Default
  #7
New Member
 
Brendan
Join Date: Oct 2012
Posts: 10
Rep Power: 13
clarkie_49 is on a distinguished road
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
clarkie_49 is offline   Reply With Quote

Old   October 8, 2012, 02:03
Default
  #8
New Member
 
Join Date: Sep 2012
Posts: 7
Rep Power: 13
oinch is on a distinguished road
Well thank you very much I will try to do that !
oinch is offline   Reply With Quote

Old   October 8, 2012, 07:52
Arrow
  #9
New Member
 
hzsme
Join Date: Sep 2012
Posts: 7
Rep Power: 13
hzsme is on a distinguished road
refer to below link and solve your problom


http://www.question-defense.com/2009...-or-batch-file
hzsme is offline   Reply With Quote

Old   October 10, 2012, 06:19
Default
  #10
Member
 
Tamil Nadu
Join Date: Oct 2012
Posts: 44
Rep Power: 13
nkme2007 is on a distinguished road
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?
nkme2007 is offline   Reply With Quote

Old   October 18, 2018, 05:40
Default
  #11
Member
 
Oula
Join Date: Apr 2015
Location: United Kingdom
Posts: 81
Rep Power: 11
Oula is on a distinguished road
Quote:
Originally Posted by blackmask View Post
VS = (Microsoft) Visual Studio
First you should make sure that you have at least one C compiler installed in your OS, MSVC is a common choice in windows. Then you should make sure that the directory containing "nmake.exe" is in the "Path" variable, otherwise you have to edit the Path manually. Search "manage environment variable windows" for more information.
You don't have to run Fluent from the "Visual Studio Command Prompt" if your path variable is set correctly.

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
Oula is offline   Reply With Quote

Old   October 18, 2018, 10:26
Default
  #12
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,675
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Quote:
Originally Posted by Oula View Post
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

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.
Oula likes this.
LuckyTran is offline   Reply With Quote

Old   October 18, 2018, 11:57
Default
  #13
Member
 
Oula
Join Date: Apr 2015
Location: United Kingdom
Posts: 81
Rep Power: 11
Oula is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
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.
Dear LuckTran, thank you for your reply. I found the path in the system variable, then in the variable value what should I write in?. is the path that you have mentioned is:

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
Oula is offline   Reply With Quote

Old   October 18, 2018, 12:50
Default
  #14
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,675
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Quote:
Originally Posted by Oula View Post
Dear LuckTran, thank you for your reply. I found the path in the system variable, then in the variable value what should I write in?. is the path that you have mentioned is:

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

add whatever is the directory where your nmake is located.
LuckyTran is offline   Reply With Quote

Old   March 28, 2020, 05:01
Default
  #15
New Member
 
Kon
Join Date: Mar 2020
Posts: 1
Rep Power: 0
k_ina is on a distinguished road
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
kailash007, mcc007 and livms like this.
k_ina is offline   Reply With Quote

Old   November 10, 2020, 19:21
Default LINK : fatal error LNK1104: cannot open file 'kernel32.lib'
  #16
New Member
 
kailash
Join Date: Jun 2018
Posts: 19
Rep Power: 7
kailash007 is on a distinguished road
Got this error when i followed the steps. Any one got this error?
kailash007 is offline   Reply With Quote

Old   November 11, 2020, 00:38
Talking Got the answer!
  #17
New Member
 
kailash
Join Date: Jun 2018
Posts: 19
Rep Power: 7
kailash007 is on a distinguished road
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
kailash007 is offline   Reply With Quote

Old   December 24, 2020, 20:42
Default
  #18
New Member
 
Anthony Hamzah
Join Date: Sep 2016
Location: Tokyo
Posts: 3
Rep Power: 9
antoinetonee is on a distinguished road
Quote:
Originally Posted by k_ina View Post
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
Tried your suggestion, it still doesn't work. The 'nmake' is still not recognized. I think I need to reinstall everything afterall.

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.
antoinetonee is offline   Reply With Quote

Old   December 25, 2020, 15:31
Default
  #19
New Member
 
Alexander
Join Date: Dec 2020
Posts: 8
Rep Power: 5
Alexander00 is on a distinguished road
Quote:
Originally Posted by antoinetonee View Post
Tried your suggestion, it still doesn't work. The 'nmake' is still not recognized. I think I need to reinstall everything afterall.

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.
Yes, it is true. Even i tried everything for this error but i'm not able to solve the problem till now.
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.
Alexander00 is offline   Reply With Quote

Old   December 25, 2020, 15:32
Default
  #20
New Member
 
Alexander
Join Date: Dec 2020
Posts: 8
Rep Power: 5
Alexander00 is on a distinguished road
Quote:
Originally Posted by k_ina View Post
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
This solution is not working for me. If possible could you suggest any other alternative method? Please help.
Alexander00 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
8x icoFoam speed up with Cufflink CUDA solver library kmooney OpenFOAM Running, Solving & CFD 42 November 6, 2012 11:37
OpenFOAM 1.7.1 installation problem on OpenSUSE 11.3 flakid OpenFOAM Installation 16 December 28, 2010 08:48
OpenFOAM15 installables are incomplete problem with paraFoam tryingof OpenFOAM Bugs 17 December 7, 2008 04:41
Problem of compilation OF 14Allwmake command not found erik_d OpenFOAM Bugs 13 September 13, 2008 21:45
Regarding FoamX running Kindly help out hariya03 OpenFOAM Pre-Processing 0 April 18, 2008 04:26


All times are GMT -4. The time now is 21:07.