CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   UDF compilation error solved (

laurentb November 10, 2011 02:34

UDF compilation error solved
I spent some times after i get this error message in fluent while compiling :

# Generating udf_names.c because of makefile UDF_V7_Fouling.obj
udf_names.c(6) : error C2449: found '{' at file scope (missing function header?)
udf_names.c(32) : fatal error C1004: unexpected end-of-file found

Strangely it works well in interpreted mode.

It was due to the curly-bracket positionned at the end of Define_Property

DEFINE_PROPERTY(water_viscosity, cell, thread) {

If the curly-bracket is on the next line the compilation is OK :

DEFINE_PROPERTY(water_viscosity, cell, thread)


Fluent 13.0 win64 & 12.1 x86
Microsoft Visual C++ 2010 Express

fox000002 November 10, 2011 05:46

It is because fluent uses "sed" to extract the function names.

The definition should match the regular expression pattern:


^DEFINE_\([_A-Z]*\)( *\([_a-zA-Z0-9]*\).*)

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