CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT

UDF compilation error solved

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   November 10, 2011, 02:34
Default UDF compilation error solved
laurentb's Avatar
Laurent B
Join Date: Jun 2009
Location: Lille, FRANCE
Posts: 70
Rep Power: 10
laurentb is on a distinguished road
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
laurentb is offline   Reply With Quote

Old   November 10, 2011, 05:46
fox000002's Avatar
Join Date: Apr 2009
Posts: 46
Rep Power: 10
fox000002 is on a distinguished road
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]*\).*)
fox000002 is offline   Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF compilation problem on Linux System Nitin Pathak Fluent UDF and Scheme Programming 2 December 16, 2015 10:22
UDF compilation error Szabolcs Varga Fluent UDF and Scheme Programming 4 September 14, 2015 05:27
problem with compilation udf about droplet collision (DPM) Jaskull Fluent UDF and Scheme Programming 0 November 7, 2011 15:09
UDF compilation problem -- "undeclared variable" Henrik Ström FLUENT 1 September 21, 2005 05:25
Compiled UDF / Compilation problem mikhail FLUENT 1 October 13, 2000 06:12

All times are GMT -4. The time now is 12:59.