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

Error compiling: nmake' is not recognized as an internal or external command

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By blackmask

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 8, 2013, 09:17
Default Error compiling: nmake' is not recognized as an internal or external command
  #1
New Member
 
rayolau
Join Date: Aug 2012
Posts: 23
Rep Power: 14
rayolau is on a distinguished road
Hello everyone, I hope you can help me with this error, I read a lot in the programming forum, but still happening.

I have installed:
- Windows 7 Home Premium, 64 bit, service pack 1
-Fluent 6.3.26
-Microsoft Visual Studio 2010 Professional.

The error I get when I want to compile a udf is this is a common mistake in this forum, for example, appears in this thread: http://www.cfd-online.com/Forums/flu...e-problem.html

Code:
     Welcome to Fluent 6.3.26

     Copyright 2006 Fluent Inc.
     All Rights Reserved

Loading "c:\fluent.inc\fluent6.3.26\lib\fl_s1119.dmp"
Done.
 

>         1 archivo(s) copiado(s).
(system "copy c:\fluent.inc\fluent6.3.26\src\makefile_nt.udf libudff\ntx86\2d\makefile")
        1 archivo(s) copiado(s).
(chdir "libudff")()
(chdir "ntx86\2d")()
"nmake" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
"nmake" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.

Done.
"C:/MODELOS/compilar"

Opening library "libudff"...
Error: open_udf_library: El sistema no puede encontrar el archivo especificado.

Error Object: ()
I followed the steps in: http://www.cfd-online.com/Forums/flu...e-problem.html

- First installed Fluent 6.3.26 in C:\FLUENT.INC
- Second: Download Visual Studio 2010 Professional, in C:\Microsoft Visual Studio 10.0
- environment variables:
*PATH --> C:\Microsoft Visual Studio 10.0;C:\Fluent.Inc;c:\fluent.inc\ntbin\ntx86
*FLUENT_INC --> c:\fluent.inc

-system variables:
*PATH --> C:\Microsoft Visual Studio 10.0;C:\Fluent.Inc
- finally, open SDK fluent through in the folder where you want to compile the file.c.

Despite following these steps, I still get the same error.
Anyone know how I can fix it? Thanks in advance!
rayolau is offline   Reply With Quote

Old   July 8, 2013, 22:22
Default
  #2
Senior Member
 
Join Date: Aug 2011
Posts: 421
Blog Entries: 1
Rep Power: 22
blackmask will become famous soon enough
That can not be right. The PATH variable must contain the directory where "nmake.exe" resides. Do you happen to have a "nmake.exe" in the "C:\Microsoft Visual Studio 10.0" directory?

For a conventional windows program the executable files would be in a directory named "bin". You should check where the "nmake.exe" locates (say, "C:\Program Files\haha\hehe\bin") and then prepend that directory to the PATH variable,i.e.,

*Path --> C:\Program Files\haha\hehe\bin;C:\Fluent.Inc

!!!Make sure that "nmake.exe" is in the "C:\Program Files\haha\hehe\bin" directory.
chaitanyaarige likes this.
blackmask is offline   Reply With Quote

Old   July 9, 2013, 06:28
Default
  #3
New Member
 
rayolau
Join Date: Aug 2012
Posts: 23
Rep Power: 14
rayolau is on a distinguished road
Quote:
Originally Posted by blackmask View Post
That can not be right. The PATH variable must contain the directory where "nmake.exe" resides. Do you happen to have a "nmake.exe" in the "C:\Microsoft Visual Studio 10.0" directory?

For a conventional windows program the executable files would be in a directory named "bin". You should check where the "nmake.exe" locates (say, "C:\Program Files\haha\hehe\bin") and then prepend that directory to the PATH variable,i.e.,

*Path --> C:\Program Files\haha\hehe\bin;C:\Fluent.Inc

!!!Make sure that "nmake.exe" is in the "C:\Program Files\haha\hehe\bin" directory.
Thank you for your reply!
I have ensured that in the bin folder is NMAKE.EXE, and I changed the paths. environment variables that I have now are:

user variables:
- PATH: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin;C:\Fluent.Inc;c:\fluent.inc\ntbin\ntx86
- FLUENT.INC: c:\fluent.inc

System variables:
-PATH: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin;C:\Fluent.Inc;C:\Program Files\Microsoft Windows Performance Toolkit\

I opened fluent 6.3.26 from Windows SDK 7.1, in the folder that is located compile file.c want.

The UDF is an example of the UDF User Guide. I say this because, now, I appear errors are others, and I think the problem is still setup.

The udf is this:
Code:
#include "udf.h"


DEFINE_PROFILE(inlet_x_velocity, thread, index) 
{
  real x[ND_ND];		/* this will hold the position vector */
  real y;
  face_t f;

  begin_f_loop(f, thread)
    {
      F_CENTROID(x,f,thread);
      y = x[1];
      F_PROFILE(f, thread, index) = 20. - y*y/(.0745*.0745)*20.;
    }
  end_f_loop(f, thread)
}
The error is this:


Code:
 Welcome to Fluent 6.3.26

     Copyright 2006 Fluent Inc.
     All Rights Reserved

Loading "c:\fluent.inc\fluent6.3.26\lib\fl_s1119.dmp"
Done.
 

> Deleted old libudff\ntx86\2d\libudf.dll
        1 archivo(s) copiado(s).
(system "copy c:\fluent.inc\fluent6.3.26\src\makefile_nt.udf libudff\ntx86\2d\makefile")
        1 archivo(s) copiado(s).
(chdir "libudff")()
(chdir "ntx86\2d")()
prueba.c
c:\fluent.inc\fluent6.3.26\src\config.h(119) : error C2143: error de sintaxis : falta '{' delante de ':'
c:\fluent.inc\fluent6.3.26\src\config.h(119) : error C2059: error de sintaxis : ':'
c:\fluent.inc\fluent6.3.26\cortex\src\dll.h(58) : error C2061: error de sintaxis : identificador 'CX_DLL_GetProc'
c:\fluent.inc\fluent6.3.26\cortex\src\dll.h(58) : error C2059: error de sintaxis : ';'
c:\fluent.inc\fluent6.3.26\cortex\src\dll.h(58) : error C2059: error de sintaxis : 'tipo'

Done.
I doubt it's a syntax error because the udf is a textbook example. In addition, the line number on which brand syntax errors (58 and 119) do not exist! the udf not have those line numbers.

What I can do? Have any idea what happens?
Thank you so much!
Laura
rayolau is offline   Reply With Quote

Old   July 9, 2013, 08:28
Default
  #4
Senior Member
 
Join Date: Aug 2011
Posts: 421
Blog Entries: 1
Rep Power: 22
blackmask will become famous soon enough
It is definitely not an error caused by the source file. The message indicates that the errors are caused by headers provided by Fluent Inc., which means something is wrong with your configuration.

Try to change
Code:
c:\fluent.inc
in your PATH variable to something like
Code:
c:\fluent.inc\fluent6.3.26\ntbin
c:\fluent.inc\fluent6.3.26\bin
I can not tell what the correct name because I do not have windows system at hand. But you should know that if a directory contains no executable file then it is meaningless to put it in the PATH variable.

I am sorry that all what I can suggest because I never use Fluent in win* so that I have no idea of the essential setups for compiling udf in win*.
blackmask is offline   Reply With Quote

Old   July 10, 2013, 04:53
Default
  #5
New Member
 
rayolau
Join Date: Aug 2012
Posts: 23
Rep Power: 14
rayolau is on a distinguished road
PATH --> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin;C:\Fluent.Inc;c:\fluent.inc\ntbin\ntx8 6;

FLUENT_INC --> C:\Fluent.Inc\ntbin\ntx86

Also, I added two more environment variables I've read in:http://zhaoyueshuai.blog.163.com/blo...1122672611933/

And now, I have a different error...

Code:
>         1 archivo(s) copiado(s).
(system "copy C:\Fluent.Inc\fluent6.3.26\src\makefile_nt.udf libudf2\ntx86\2d\makefile")
        1 archivo(s) copiado(s).
(chdir "libudf2")()
(chdir "ntx86\2d")()
prueba.c
c:\fluent.inc\fluent6.3.26\src\machine.h(114) : warning C4005: 'stdout' : redefinici¢n de macro
        C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\stdio.h(158) : vea la definici¢n anterior de 'stdout'
c:\fluent.inc\fluent6.3.26\src\machine.h(115) : warning C4005: 'stderr' : redefinici¢n de macro
        C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\stdio.h(159) : vea la definici¢n anterior de 'stderr'
c:\fluent.inc\fluent6.3.26\src\machine.h(116) : warning C4005: 'stdin' : redefinici¢n de macro
        C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\stdio.h(157) : vea la definici¢n anterior de 'stdin'
# Generating udf_names.c because of makefile prueba.obj
udf_names.c
c:\fluent.inc\fluent6.3.26\src\machine.h(114) : warning C4005: 'stdout' : redefinici¢n de macro
        C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\stdio.h(158) : vea la definici¢n anterior de 'stdout'
c:\fluent.inc\fluent6.3.26\src\machine.h(115) : warning C4005: 'stderr' : redefinici¢n de macro
        C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\stdio.h(159) : vea la definici¢n anterior de 'stderr'
c:\fluent.inc\fluent6.3.26\src\machine.h(116) : warning C4005: 'stdin' : redefinici¢n de macro
        C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\stdio.h(157) : vea la definici¢n anterior de 'stdin'
# Linking libudf.dll because of makefile user_nt.udf udf_names.obj prueba.obj
Microsoft (R) Incremental Linker Version 10.00.30319.01
Copyright (C) Microsoft Corporation.  All rights reserved.

   Creando biblioteca libudf.lib y objeto libudf.exp

Done.
"c:/MODELOS/compilar"

Opening library "libudf2"...
Error: open_udf_library: %1 no es una aplicación Win32 válida.

Error Object: ()
In the link I put, put that warnings can be ignored, but the error... Opening library "libudf2"...
Error: open_udf_library: %1 no es una aplicación Win32 válida.


Error Object: ()

anyone know why this happens? how can fix it? Nothing found on this type of error. Thank you!
rayolau is offline   Reply With Quote

Old   July 10, 2013, 05:29
Default
  #6
Senior Member
 
Join Date: Aug 2011
Posts: 421
Blog Entries: 1
Rep Power: 22
blackmask will become famous soon enough
I do not know exactly. As a general rule, do not contain any space or non-ascii characters in the path of your case file. For the testing purpose, you could copy the case file and the udf source file in a root directory, say D:\. Then start fluent, read the case file and re-compile the source file to see if the problem disappears.
blackmask is offline   Reply With Quote

Old   July 10, 2013, 07:12
Default
  #7
New Member
 
rayolau
Join Date: Aug 2012
Posts: 23
Rep Power: 14
rayolau is on a distinguished road
Blackmask, thank you very much for answering so quickly, I changed the folder to "D:/a" and still get the same error. Thanks anyway. I hope I can fix it.
rayolau is offline   Reply With Quote

Old   July 10, 2013, 07:36
Default
  #8
New Member
 
rayolau
Join Date: Aug 2012
Posts: 23
Rep Power: 14
rayolau is on a distinguished road
I open the shortcut properties fluent, and PROPERTIES -> Compatibility -> I changed to Windows XP service pack 2. With that I managed to clear the error win32, but now can not find the library.
Code:
>         1 archivo(s) copiado(s).
(system "copy C:\Fluent.Inc\fluent6.3.26\src\makefile_nt.udf libudff\ntx86\2d\makefile")
        1 archivo(s) copiado(s).
(chdir "libudff")()
(chdir "ntx86\2d")()

Done.
"D:/a"

Opening library "libudff"...
Error: open_udf_library: El sistema no puede encontrar el archivo especificado.

Error Object: ()
It seems the problem of environment variables, right?
rayolau is offline   Reply With Quote

Old   July 11, 2013, 10:25
Default
  #9
Member
 
Christopher Hershey
Join Date: Feb 2012
Location: East Lansing, Michigan
Posts: 41
Rep Power: 14
Hershey is on a distinguished road
I ususally have this problem whenever I install Fluent before Visual Studio. Do this:

1. Open up fluent so that the first thing you see is the Fluent Launcher
2. Click on the Environment tab (you will have to click show more options if it is not there)
3. Make sure the checkbox is ticked for "Setup Compilation Environment for UDF"
4. Take note of the path it has labeled in the box, if it is not there look for it here:

"C:\Program Files\Ansys Inc\v145\fluent\ntbin\win64\udf.bat"

The udf.bat file is what you are looking for and the above location may be slightly different for you. Make sure that the location is written in box mentioned above after this is all done.

This file is making sure that when Fluent loads, the correct environment variables are included. You will want to make sure that code is pointing to the right direction of you visual studio installation.

When I installed Visual Studio 2012, there was no mention of it in the udf.bat file, so I just copied and pasted an older versions line of code and modified the path so Fluent recognized it.

Save any changes in the udf.bat and REMOVE any path variables that you explicitly defined in Windows.

Post back with your results please.
Hershey is offline   Reply With Quote

Old   July 12, 2013, 06:55
Default
  #10
New Member
 
rayolau
Join Date: Aug 2012
Posts: 23
Rep Power: 14
rayolau is on a distinguished road
Quote:
Originally Posted by Hershey View Post
I ususally have this problem whenever I install Fluent before Visual Studio. Do this:

1. Open up fluent so that the first thing you see is the Fluent Launcher
2. Click on the Environment tab (you will have to click show more options if it is not there)
3. Make sure the checkbox is ticked for "Setup Compilation Environment for UDF"
4. Take note of the path it has labeled in the box, if it is not there look for it here:

"C:\Program Files\Ansys Inc\v145\fluent\ntbin\win64\udf.bat"

The udf.bat file is what you are looking for and the above location may be slightly different for you. Make sure that the location is written in box mentioned above after this is all done.

This file is making sure that when Fluent loads, the correct environment variables are included. You will want to make sure that code is pointing to the right direction of you visual studio installation.

When I installed Visual Studio 2012, there was no mention of it in the udf.bat file, so I just copied and pasted an older versions line of code and modified the path so Fluent recognized it.

Save any changes in the udf.bat and REMOVE any path variables that you explicitly defined in Windows.

Post back with your results please.
Thanks for your reply!

The first steps you said are not possible for Fluent 6.3.26. When I open this version of Fluent, the launcher is very basic and does not have those options. I searched the file in the folder udf.bat Fluent.inc and I have not. Probably, for this version of Fluent, that file is called differently. I followed the path equivalent to that I've put C: \ Fluent.Inc \ ntbin \ ntx86, and I have these files (image attached with files and launcher)

Thanks in advance!
Attached Images
File Type: jpg files.jpg (31.0 KB, 87 views)
rayolau is offline   Reply With Quote

Old   July 14, 2013, 23:18
Default
  #11
Member
 
Christopher Hershey
Join Date: Feb 2012
Location: East Lansing, Michigan
Posts: 41
Rep Power: 14
Hershey is on a distinguished road
Sorry, I did not see that you were using version 6. I am not familiar with setting this version up, but I did have a working copy on my previous computer. Have you tried using the "setenv.exe" that is located in the folder you have posted. It will add the appropriate paths to your system. Maybe they are slightly different than what is listed in previous suggestions.
Hershey is offline   Reply With Quote

Old   September 29, 2015, 07:23
Default
  #12
New Member
 
Abhinay Iyer
Join Date: May 2015
Posts: 11
Rep Power: 11
abhinayiyer2408 is on a distinguished road
Dear Rayolau,

Could you solve the problem??? I'm facing the same problem as yours... Please help me out....
abhinayiyer2408 is offline   Reply With Quote

Reply

Tags
compile, error, fluent 6.3.26, nmake

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
'nmake' is not recognized as an internal or external command ... adambarfi FLUENT 32 September 13, 2021 09:00
8x icoFoam speed up with Cufflink CUDA solver library kmooney OpenFOAM Running, Solving & CFD 42 November 6, 2012 12:37
OpenFOAM 1.7.1 installation problem on OpenSUSE 11.3 flakid OpenFOAM Installation 16 December 28, 2010 09:48
OpenFOAM15 installables are incomplete problem with paraFoam tryingof OpenFOAM Bugs 17 December 7, 2008 05:41
Regarding FoamX running Kindly help out hariya03 OpenFOAM Pre-Processing 0 April 18, 2008 05:26


All times are GMT -4. The time now is 11:12.