CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

UDF compilation error solved

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

Like Tree1Likes
  • 1 Post By laurentb

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 10, 2011, 02:34
Default UDF compilation error solved
  #1
Member
 
laurentb's Avatar
 
Laurent B
Join Date: Jun 2009
Location: Lille, FRANCE
Posts: 70
Rep Power: 16
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
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
alireza2475 likes this.
laurentb is offline   Reply With Quote

Old   November 10, 2011, 05:46
Default
  #2
Member
 
fox000002's Avatar
 
Join Date: Apr 2009
Posts: 46
Rep Power: 16
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:

Code:
^DEFINE_\([_A-Z]*\)( *\([_a-zA-Z0-9]*\).*)
fox000002 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
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 6 September 29, 2018 21:26
UDF compilation error Szabolcs Varga Fluent UDF and Scheme Programming 4 September 14, 2015 06: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 06:25
Compiled UDF / Compilation problem mikhail FLUENT 1 October 13, 2000 07:12


All times are GMT -4. The time now is 08:15.