CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   why appear error? (https://www.cfd-online.com/Forums/fluent/37799-why-appear-error.html)

wanghong September 5, 2005 23:40

why appear error?
 
hi,when i compile any code with '#include <udf.h>'in its first line,copmuter always tells me that no such file or directory.why?help me pls!

thanks!

Ahmed September 6, 2005 20:49

Re: why appear error?
 
include what? do you write the name of the file you want to include? is it in the programme directory?

wanghong September 6, 2005 22:59

Re: why appear error?
 
code is following:

#inlude"udf.h" ......


Ahmed September 7, 2005 03:21

Re: why appear error?
 
OK, if it is written exactly as you have it here then where is the space between the #include directive and the file name. If the file is not in the main directory you can either copy it to the main directory or write the complete file name including the path e.g. <c:\xxxx\xxx\udf.h> In C language the <xxxx> and "xxxx" have different meanings to the parser. Check any C language book for the differenc. Hope that will solve your problem and Good luck

wanghong September 7, 2005 04:52

Re: why appear still error?
 
hi,error still exist. the case is following: #include "C:\FLUENT.INC\FLUENT\fluent6.0\client\src\udf .h" DEFINE_PROFILE(inlet_xv_sinusoidal, /* function name */

thread, /* thread

nv) /* variable number */ { face_t f; real flow_time = RP_Get_Real("flow-time");

begin_f_loop (f,thread)

{

F_PROFILE(f,thread,nv) = 20. + 5.*sin(10.*flow_time);

} end_f_loop (f,thread) }

Compiling... inlet_xv_sinusoidal.c c:\documents and settings\管理'\桌面\inlet_xv_sinusoidal.c(1) : fatal error C1083: Cannot open include file: 'C:\FLUENT.INC\FLUENT\fluent6.0\client\src\udf.h': No such file or directory Error executing cl.exe.

inlet_xv_sinusoidal.obj - 1 error(s), 0 warning(s)

why?


zxaar September 7, 2005 05:04

Re: why appear error?
 
its something to do with your path settings of the header, please ask to fluent support about this, they are best person to advise on this issue.

Ahmed September 7, 2005 23:05

Re: why appear still error?
 
Call your support engineer and if possible post the reason for that, you have forced the compiler to read the file where it is residing, wish happy ending to that situation.


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