UDF- parse error
HI, I am trying to interpret the following UDF. I have searched several different threads having similar issues and tried the provided solutions too, but in vain.
#include "udf.h" #include "stdlib.h" #include "stdio.h" #include "process.h" #include "malloc.h" #include "math.h" DEFINE_PROFILE(wall_2, thread, index) { real x[ND_ND]; face_t f; int count,i; real w,a,b; FILE *fpp; FILE *fp; fpp=fopen("MianT.dat","w+"); fp=fopen("MianT2.dat","r+"); count=0; begin_f_loop(f,thread) { count=count+1; fscanf(fp,"%d %f %f %f",&i,&a,&b,&w); F_CENTROID(x,f,thread); F_PROFILE(f,thread,index)=w; fprintf(fpp,"%d %f %f %f %f",count,x[0],x[1],w); } end_f_loop(f,thread) fclose(fpp); fclose(fp); } Error cpp -I"C:\PROGRA~1\ANSYSI~1\v150\fluent\fluent15.0.0/src" -I"C:\PROGRA~1\ANSYSI~1\v150\fluent\fluent15.0.0/cortex/src" -I"C:\PROGRA~1\ANSYSI~1\v150\fluent\fluent15.0.0/client/src" -I"C:\PROGRA~1\ANSYSI~1\v150\fluent\fluent15.0.0/multiport/src" -I. -DUDF ONFIG_H="<udfconfig.h>" "I:\reciever-no-walls\reciever-no-walls-meshing_files\dp0\FFF\Fluent\source.c" Error: C:\\PROGRA~1\\ANSYSI~1\\v150\\fluent\\fluent15.0.0/src/vadefs.h: line 50: parse error. This is my first time using UDF's, I am still confused how is the file as mentioned in error, (vadefs.h) linked to the UDF. In another post, some senior advised removing #include "stdlib.h" #include "stdio.h" #include "process.h" #include "malloc.h" #include "math.h" lines, as these are mostly included in "udf.h", I did so but it gave the following error. The fl process could not be started. whats the reason for the error? and how to get rid of it? Expecting help! Sincerely thanks |
tried following things since I posted
A friend said UDF's having read and write files can't be interpreted, so I must compile it. and it gives the following errors.
Copied I:\reciever-no-walls\reciever-no-walls-meshing_files\dp0\FFF\Fluent/I:\reciever-no-walls\reciever-no-walls-meshing_files\dp0\FFF\Fluent\source.c to libudf\src udf_names.c and user_nt.udf files in 3d are upto date. (system "copy "C:\PROGRA~1\ANSYSI~1\v150\fluent"\fluent15.0.0\sr c\makefile_nt.udf "libudf\win64\3d\makefile" ") 1 file(s) copied. (chdir "libudf")(chdir "win64\3d")# Generating ud_io1.h source.c C:\PROGRA~1\ANSYSI~1\v150\fluent\fluent15.0.0\src\ math.h(482) : error C2059: syntax error : ',' C:\PROGRA~1\ANSYSI~1\v150\fluent\fluent15.0.0\src\ math.h(482) : error C2143: syntax error : missing ')' before 'constant' C:\PROGRA~1\ANSYSI~1\v150\fluent\fluent15.0.0\src\ math.h(482) : error C2143: syntax error : missing '{' before 'constant' C:\PROGRA~1\ANSYSI~1\v150\fluent\fluent15.0.0\src\ math.h(482) : error C2059: syntax error : '<Unknown>' C:\PROGRA~1\ANSYSI~1\v150\fluent\fluent15.0.0\src\ math.h(482) : error C2059: syntax error : ')' Done. |
All times are GMT -4. The time now is 03:17. |