CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   Compiling problem (

Alper Albayraq August 22, 2005 10:43

Compiling problem
Hi I am new fluent user. I cannot compile the tuterial file(dynamic mesh example)(valve.c) from the COMPILED UDFs Panel and when I press the build button i recieve this message

('nmake' is not recognized as an internal or external command operable program or batch file.) and then when i load it i recieve this error

(Error: open-udf-library: the system cannot find the path specified)

what should i do?

Regards, Alper

Aireen August 22, 2005 11:12

Re: Compiling problem
I am having the same problem and still could not solve it!!!! What compiler are you using?

Alper Albayraq August 22, 2005 12:52

Re: Compiling problem

I dont know whether fluent needs another outof-fluent compiler such as visual c++ for compiling in itself. Because in fluent help I read such sentences

1.Compiled udf's are build in the same way that the fluent executable itself is build

2.A script called "Makefile" is used to invoke the system C compiler(???) to build an object code library

3.The object code library contains the native machine language translation of your high level c source code

4. This shared library is then loaded into fluent at runtime by process called "dynamic loading".

If you say that "Yes it needs outof-fluent C compiler" then I ask how fluent finds the path of your C compiler?

After all it is better that i answer your question. Yes I have a (Microsoft visual c++ 6) installed in my computer.

Thanks for your attention, Alper

Jimmy Fox August 23, 2005 08:35

Re: Compiling problem
Please work in Command Prompt Window of C++, and launch Fluent, then try to compile UDF. It may work.

Suvash August 24, 2005 02:08

Re: Compiling problem
You should keep your UDF file in the temp directory of your computer...

Alper Albayraq August 25, 2005 00:54

Re: Compiling problem

I finally could compile the file having visual c++ 6 installed in my computer. thanks for all of you for your attention. See you in other problem!

Best Regards, Alper

hari August 25, 2005 12:46

Re: Compiling problem
Try this You need to follow the following steps 1) set up the environmental variable This is done by going to the start menu > Programs>Fluent> Set_environment clicking this would set the path and variable. 2) set up a directory structure as follows create a dir libudf in that create "src" and "ntx86". In ntx86 create "3d".( am asuming that ur simulation is 3d) 3) copy the udf (.C file) and the required header( u can get the header files frm c:\FLUENT.INC\fluent6.*.*\ntx86\src) files into the "src" folder. 4) go to c:\FLUENT.INC\fluent6.*.*\ntx86\3d copy the contents into the 3d folder which you created. 5) go to c:\FLUENT.INC\fluent6.*.*\ntx86\src copy makefile_nt.udf and user_nt.udf to your 3d folder 6) rename makefile_nt.edf to makefile and open user_nt.udf and read the instructions and do accordingly. 7) close FLUENT . Open command prompt ( start > accessories > command prompt ) type the following C:\ CD program Files \ microsoft visual studio .net\vc7\bin 8) type :- vcvars32 9)go to the libudf\ntx86\3d which u have created 10) type nmake 11) This will compile ur code and build a lib if u dont have any errors , if errors are present it will say so u need to debug it then. 12) once this is done u can open fluent again and load the lib u have just created , in this case it would be libudf.


Alper Albayraq August 26, 2005 01:39

Re: Compiling problem
Hi hari

Thank you very much indeed. Your guidance realy worked very well. But I have some more questions. Sorry for my ignorance.I am not well in computer science.

1:What vcvars32 does?

2:Then what nmake does?

3:why when i work with (Visual c++ 6) rather than (visual there is no need for such steps you've mentioned?

4:when fluent solve a case which have a compiled udf, Does fluent use out-of-fluent compiler(such as visual c++) in the same time when it iterates?

Thanks for devoting your time for me.

Best regards, Alper

All times are GMT -4. The time now is 17:51.