CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Compiled UDF / Compilation problem (http://www.cfd-online.com/Forums/fluent/27940-compiled-udf-compilation-problem.html)

mikhail October 11, 2000 11:35

Compiled UDF / Compilation problem
 
Hi !

I composed a UDF for VOF method.The first four lines of this UDF are library including instructions: #include "udf.h" #include "mem.h" #include "metric.h" #include "sg_vof.h".

The compilation output is terrible to look at.It says the next:

make[1]: Entering directory `/home/student1/FluentF/Mesh/libudf/lnx86/2d' # Generating udf_names.c because of udfvof1.c make[2]: Entering directory `/home/student1/FluentF/Mesh/libudf/lnx86/2d' make libudf.so "CFLAGS=-fpic -shared -ansi -Wall -O " "LDFLAGS=-shared -lm" make[3]: Entering directory `/home/student1/FluentF/Mesh/libudf/lnx86/2d' # Compiling udf_names.o because of udf_names.c cc -fpic -shared -ansi -Wall -O -I/usr/local/Fluent.Inc/fluent5.3/`expr \`pwd\` : '.*/\(.*\)/[23].*'`/`basename \`pwd\`` -I/usr/local/Fluent.Inc/fluent5.3/src -I/usr/local/Fluent.Inc/fluent5.3/cortex/src -I/usr/local/Fluent.Inc/fluent5.3/client/src -I/usr/local/Fluent.Inc/fluent5.3/tgrid/src -I/usr/local/Fluent.Inc/fluent5.3/multiport/src -c udf_names.c # Compiling udfvof1.o because of udfvof1.c cc -fpic -shared -ansi -Wall -O -I/usr/local/Fluent.Inc/fluent5.3/`expr \`pwd\` : '.*/\(.*\)/[23].*'`/`basename \`pwd\`` -I/usr/local/Fluent.Inc/fluent5.3/src -I/usr/local/Fluent.Inc/fluent5.3/cortex/src -I/usr/local/Fluent.Inc/fluent5.3/client/src -I/usr/local/Fluent.Inc/fluent5.3/tgrid/src -I/usr/local/Fluent.Inc/fluent5.3/multiport/src -c udfvof1.c In file included from udfvof1.c:2: /usr/local/Fluent.Inc/fluent5.3/src/mem.h:17: conflicting types for `SM_EQN_G' /usr/local/Fluent.Inc/fluent5.3/src/mem.h:17: previous declaration of `SM_EQN_G' /usr/local/Fluent.Inc/fluent5.3/src/mem.h:18: conflicting types for `SM_VIS1' /usr/local/Fluent.Inc/fluent5.3/src/mem.h:18: previous declaration of `SM_VIS1' /usr/local/Fluent.Inc/fluent5.3/src/mem.h:19: conflicting types for `SM_TMP0' /usr/local/Fluent.Inc/fluent5.3/src/mem.h:19: previous declaration of `SM_TMP0' /usr/local/Fluent.Inc/fluent5.3/src/mem.h:20: conflicting types for `SM_NRMDIST' /usr/local/Fluent.Inc/fluent5.3/src/mem.h:20: previous declaration of `SM_NRMDIST' /usr/local/Fluent.Inc/fluent5.3/src/mem.h:21: conflicting types for `SM_EQLENSQ' /usr/local/Fluent.Inc/fluent5.3/src/mem.h:21: previous declaration of `SM_EQLENSQ'...

and so on mentioning all the variables in libraries mem.h, storage.h and metric.h.The last lines of this output are :

/usr/local/Fluent.Inc/fluent5.3/src/metric.h:40: conflicting types for `QUAD_FACE' /usr/local/Fluent.Inc/fluent5.3/src/metric.h:40: previous declaration of `QUAD_FACE' /usr/local/Fluent.Inc/fluent5.3/src/metric.h:40: redefinition of `Face_Element_Type' /usr/local/Fluent.Inc/fluent5.3/src/metric.h:40: `Face_Element_Type' previously declared here make[3]: *** [udfvof1.o] Error 1 make[3]: Target `libudf.so' not remade because of errors. make[3]: Leaving directory `/home/student1/FluentF/Mesh/libudf/lnx86/2d' make[2]: *** [lnx86] Error 2 make[2]: Leaving directory `/home/student1/FluentF/Mesh/libudf/lnx86/2d' make[1]: *** [default] Error 2 make[1]: Leaving directory `/home/student1/FluentF/Mesh/libudf/lnx86/2d'

The /home/student1/FluentF/Mesh/libudf is a directory, where I keep my udf files.

May be somebody had the problem like this while compiling his own UDF ? I'd be very grateful to everybody who will send me his ideas about this matter.

Best wishes, Mikhail

Rüdiger Schwarze October 13, 2000 06:12

Re: Compiled UDF / Compilation problem
 
To my opinion You do'nt need the lines #include "mem.h" #include "metric.h" #include "sg_vof.h" in Your udf file.


All times are GMT -4. The time now is 11:38.