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

UDF compile warning: no newline at end of file

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

Reply
 
LinkBack Thread Tools Display Modes
Old   November 28, 2007, 04:03
Default UDF compile warning: no newline at end of file
  #1
mrt
Guest
 
Posts: n/a
Dear All,

I try to compile a simple UDF which is involving an inlet velocity profile. But I get this common warning :

warning: no newline at end of file

It is explained in Fluent tutorial: "Another common error occurs when the argument list for a DEFINE statement is placed on multiple lines. (All DEFINE macro arguments must be listed on the same line in a C file.)"

My macro arguments are already on the same line (as seen below). Can anyone help me with this error?

with kind regards,

#include "udf.h"

DEFINE_PROFILE(axial_velocity,t,i)

{

real x[ND_ND];

real y;

face_t f;

begin_f_loop(f,t)

{

F_CENTROID(x,f,t);

y = x[0];

F_PROFILE(f,t,i) = 5.31*(1-(y/.05)*(y/.05));

}

end_f_loop(f,t)

}

  Reply With Quote

Old   November 30, 2007, 13:43
Default Re: UDF compile warning: no newline at end of file
  #2
mohanraj
Guest
 
Posts: n/a
I din't see any error while compiling your code. I used "compiled" udf option and load the library using manage option(define->user-defined->functions->compiled & load library). I am able to see as a profile in the boundary condition panel.

Thanks, mohan
  Reply With Quote

Old   December 1, 2007, 02:15
Default Re: UDF compile warning: no newline at end of file *NM*
  #3
suribabu
Guest
 
Posts: n/a
  Reply With Quote

Old   December 1, 2007, 02:16
Default Re: UDF compile warning: no newline at end of file
  #4
suribabu
Guest
 
Posts: n/a
i am not getting any mistake in your udf.
  Reply With Quote

Old   December 5, 2007, 05:48
Default Re: UDF compile warning: no newline at end of file
  #5
szz
Guest
 
Posts: n/a
This is a common compiler error. You simply need to add one new empty line at the end of your .c source code file before saving it. Then it should work fine.

Greetings szz
  Reply With Quote

Reply

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
Version 15 on Mac OS X gschaider OpenFOAM Installation 120 December 2, 2009 11:23
transient simulation of a rotating rectangle icesniffer CFX 1 August 8, 2009 07:25
ParaView Compilation jakaranda OpenFOAM Installation 3 October 27, 2008 12:46
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 01:24
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51


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