CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   error LNK2001: unresolved external symbol & fatal error LNK1120: 1 unresolved externa (http://www.cfd-online.com/Forums/fluent-udf/122234-error-lnk2001-unresolved-external-symbol-fatal-error-lnk1120-1-unresolved-externa.html)

aydinn August 14, 2013 23:21

error LNK2001: unresolved external symbol & fatal error LNK1120: 1 unresolved externa
 
Hi dear friends
I'm almost new to UFDs. I got an error while compiling a UDF. I can't understand what does it mean and what should I do to solve the problem.

Here is my UDF. It's a simple GRID_MOTION code.
Please, please, please help me. :(
I don't know how to mend it.

thank you very much

************************************************** ********
#include "udf.h"

real p, rdot, a=0.001499, g=0.4255 , deltaY , T , X;
int j=0;
int n;

DEFINE_GRID_MOTION(grid_aydin_1,domain,dt,time,dti me)
{
Thread *t = DT_THREAD (dt);
face_t f;
Node *v;

real rdot = 0.0;

p = 0.0;

/* int j;

j = 0 ; */

T = F_T(f,t);
X = Node_X(v);


if (T >= 700)


{


begin_f_loop (f,t)

{
j=j+1;


/* int n; */
f_node_loop(f,t,n)

{

v = F_NODE(f,t,n);

if (NODE_POS_NEED_UPDATE(v))

{

NODE_POS_UPDATED(v);

p = F_P (f,t)/101325.;

/* rdot = a*pow(p,g); */



if (X <= 1)

{
rdot=0.05;
}

else if (1 < X <=2)

{
rdot=0.1;
}
else
{
rdot=0.15;
}

deltaY = rdot*dtime;

NODE_Y(v) =NODE_Y(v)+ deltaY;

}
}

}

end_f_loop (f,t);
}
}

************************************************** ********




and these are the errors:

************************************************** ********
1 file(s) copied.
(system "copy C:\Fluent.Inc\fluent6.3.26\src\makefile_nt.udf libudf\ntx86\2ddp\makefile")
1 file(s) copied.
(chdir "libudf")()
(chdir "ntx86\2ddp")()
grid_4.c
..\..\src\grid_4.c(22) : warning C4700: local variable 'f' used without having been initialized
# Generating udf_names.c because of makefile grid_4.obj
udf_names.c
# Linking libudf.dll because of makefile user_nt.udf udf_names.obj grid_4.obj
Microsoft (R) Incremental Linker Version 6.00.8168
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

Creating library libudf.lib and object libudf.exp
grid_4.obj : error LNK2001: unresolved external symbol _Node_X
libudf.dll : fatal error LNK1120: 1 unresolved externals

Done.
"f:/documents and settings/aydin/desktop/e2 - 4 [with different rdot - (pelle'i)]"

Opening library "libudf"...
Error: open_udf_library: The system cannot find the file specified.

Error Object: ()

************************************************** ********

aydinn August 14, 2013 23:24

The errors
 
grid_4.obj : error LNK2001: unresolved external symbol _Node_X
libudf.dll : fatal error LNK1120: 1 unresolved externals


Error: open_udf_library: The system cannot find the file specified.

aydinn August 16, 2013 20:37

thanks to every one
I got the problem myself.
It was a mistake made by myself. I wrote "NODE_X" in lower case letters. :D


All times are GMT -4. The time now is 16:14.