Error compiling: nmake' is not recognized as an internal or external command
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:
- 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! |
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. |
Quote:
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" Code:
Welcome to Fluent 6.3.26 What I can do? Have any idea what happens? Thank you so much! Laura |
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 Code:
c:\fluent.inc\fluent6.3.26\ntbin 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*. |
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... :confused: Code:
> 1 archivo(s) copiado(s). 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! |
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, 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.:(
|
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). |
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. |
1 Attachment(s)
Quote:
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! |
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.
|
Dear Rayolau,
Could you solve the problem??? I'm facing the same problem as yours... Please help me out....:confused: :( :mad: |
All times are GMT -4. The time now is 21:45. |