CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   building compiled udf s in windows (http://www.cfd-online.com/Forums/fluent/37529-building-compiled-udf-s-windows.html)

sourav August 9, 2005 12:47

building compiled udf s in windows
 
I was trying to build a compiled udf in windows xp.I tried out with the example given in the UDF manual. When I typed "nmake" in the command prompt from the ../../2d directory,it gives a weird error msg in the command prompt saying :

# Generating udf_names.c because of makefile udfexample.obj 'sed' is not recognized as an internal or external command, operable program or batch file. NMAKE : fatal error U1077: 'sed' : return code '0x1' Stop.

what does this mean?? what is going wrong??I have followed all the procedures in the UDF manual. can anybody help me out?? thanks in advance. sourav

pUl| August 9, 2005 13:33

Re: building compiled udf s in windows
 
I cannot be sure, but if i remember correctly, sed is a 'stream editor' commonly used in *nix systems. Apparently, it has a DOS counterpart which is somehow being called by nmake. I'm not sure why you type 'nmake' in the ../../2d directory (you still have not told us what the current directory [.] is?).

Vinod Dhiman August 10, 2005 03:10

Re: building compiled udf s in windows
 
Hi Sourav

Is there any need to build or compile the udf. As much as I know, Fluent reads those udf's and compiles them themselves, however, you ought to have C++ in your computer and Fluent should be knowing its path, that can be done using Environment Variables.

Vinod Dhiman

sourav August 10, 2005 05:31

Re: building compiled udf s in windows
 
thanks a lot for the responses.I have fortunately been able to solve the problem.Actually,although I had the FLUENT.INC folder included in the executable path,I did not have the ../../ntbin/ntx86 included in the path.There is an executable file in ../../ntbin/ntx86 called setenv.exe which when run, does this inclusion.sed.exe is a file in the ntx86 directory.The problem was that since the ntx86 directory was not in the path,sed.exe could not be run by DOS. As for the need for compiling UDFs,interpreted UDFs have certain limitations which can be overcome by compiling them.The differences are discussed in detail in the FLUENT UDF manual

Vinod Dhiman August 10, 2005 05:42

Re: building compiled udf s in windows
 
That's good Sourav

Best of your work

Vinod Dhiman

Firas August 13, 2005 05:46

Re: building compiled udf s in windows
 
Dear Sir could you explain more since fluent compiler dosent understand udf.h in my program. how to tell fluent c++ path ? where to go. is Visuall c++ give same results. thank you

Vinod Dhiman August 13, 2005 07:09

Re: building compiled udf s in windows
 
Hi Firas

It depends on what OS you are using. If you are using Visula C++ then it implies you're using Windows. Although, I have never compiled it in Windows, however, I don't think VC++ will do the job. Any how, you have to define Environment Variables. You might be knowing the path to C++ compiler, the file you use to start VC++. Then in control panel, go to system, click on advanced tab, at the lowest line, click on environment variables. Click on new, and in the variable write c++ and in the value, the full path of that file.

The udf.h file should be in the same directory where the udf file written by you is located. After that call this udf in fluent. It should work.

Best of your work Vinod Dhiman

dirk August 17, 2005 08:26

Re: building compiled udf s in windows
 
Hello Sourav,

could you please explain in detail what exactly you did. Was it just executing setenv.exe ? After I do this I still cannot compile UDFs. Thanks in advance

Dirk

Firas August 18, 2005 01:46

Re: building compiled udf s in windows
 
Hi Vinod thank you i used cpp compiler called Dev-cpp and have the following errors: dev-cpp -IC:\FLUENT.INC\fluent6.0/src -IC:\FLUENT.INC\fluent6.0/cortex/src -IC:\FLUENT.INC\fluent6.0/client/src -IC:\FLUENT.INC\fluent6.0/multiport/src -I. -DUDFCONFIG_H="<udfconfig.h>" unsteady.c error: udf compiler: cannot execute dev-cpp -IC:\FLUENT.INC\fluent6.0/src -IC:\FLUENT.INC\fluent6.0/cortex/src -IC:\FLUENT.INC\fluent6.0/client/src -IC:\FLUENT.INC\fluent6.0/multiport/src -I. -DUDFCONFIG_H="<udfconfig.h>" unsteady.c

what do you think about best regards Firas


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