CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   C++ Compiler for UDF (

Dmitriy Makarov November 29, 2000 08:04

C++ Compiler for UDF
Dear all,

I need to compile my UDF. Fluent's Win NT FAQ page strictly advises Microsoft Visual C++ 6.0 compiler as the only choice. Is it really the only way to do it?

I have Borland C/C++ 5.01 GNU, which contains Microsoft NMAKE version 1.60.5270. It seems to work OK, but I can not see anything like "libudf.*" in UDF source directory. The output is like this:

cl /c /Za /Dextern=__declspec(dllimport) -I\\molk\d\\fluent5.3\ntx86\2d -I\\molk\d\\fluent5.3\src -I\\molk\d\\fluent5.3\cortex\src -I\\molk\d\\fluent5.3\client\src -I\\molk\d\\fluent5.3\tgrid\src -I\\molk\d\\fluent5.3\multiport\src ..\..\src\chan_1.c

echo # Generating udf_names.c because of makefile chan_1.obj

sed -n "s/^DEFINE_\([_A-Z]*\)( *\([_a-zA-Z0-9]*\).*)/\2\ /p" ..\..\src\chan_1.c >> udfdll.def

cl /c /Za -I\\molk\d\\fluent5.3\ntx86\2d -I\\molk\d\\fluent5.3\src -I\\molk\d\\fluent5.3\cortex\src -I\\molk\d\\fluent5.3\client\src -I\\molk\d\\fluent5.3\tgrid\src -I\\molk\d\\fluent5.3\multiport\src udf_names.c

echo # Linking libudf.dll because of makefile user_nt.udf udf_names.obj chan_1.obj

link /Libpath:\\molk\d\\fluent5.3\ntx86\2d /dll /debug /out:libudf.dll /def:udfdll.def udf_names.obj chan_1.obj fl5318s.lib

Any suggestions are very welcome. Thank you,


Lasse Rosendahl December 12, 2000 03:41

Re: C++ Compiler for UDF
Hi Dmitriy,

I use MS Visual C++ 4.0 - it seems to work fine (a little bit of dll confusion, but that can be easily worked around).


All times are GMT -4. The time now is 18:33.