CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   Compiled UDF (

Lu Hu February 7, 2002 13:15

Compiled UDF
Anybody has tried to use thread_loop_c in compiled UDF(OS: Win2k Professional)? I wrote one like this:

#include "udf.h"

extern Domain* domain;


Thread *t;

cell_t c;







} }

I can compile the file and get the .dll file. But when I tried to run the udf in Fluent, it gave the error message: Error: FLUENT received fatal signal (ACCESS_VIOLATION) 1. Note exact events leading to error. 2. Save case/data under new name. 3. Exit program and restart to continue. 4. Report error to your distributor. Error Object: ()

Seems I cannot use thread_loop_c. Has anybody encountered similar problem? Thanks.


hampton February 14, 2002 09:15

Re: Compiled UDF

the reason of error is "extern Domain* domain". this macro does not work on any Windows . So you have to replace this macro to "Domain *domain = Get_Domain(1)".


Lu Hu February 14, 2002 13:19

Re: Compiled UDF
Thank you. It works!

All times are GMT -4. The time now is 20:52.