CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   UDF compilation error solved (https://www.cfd-online.com/Forums/fluent/94238-udf-compilation-error-solved.html)

laurentb November 10, 2011 01: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
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)
{

Regards,


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

fox000002 November 10, 2011 04:46

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

The definition should match the regular expression pattern:

Code:

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


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