CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

error LNK2001: unresolved external symbol & fatal error LNK1120: 1 unresolved externa

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By aydinn

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 15, 2013, 00:21
Unhappy error LNK2001: unresolved external symbol & fatal error LNK1120: 1 unresolved externa
  #1
New Member
 
Aydin
Join Date: Jul 2013
Location: Iran
Posts: 3
Rep Power: 13
aydinn is on a distinguished road
Send a message via Yahoo to aydinn
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 is offline   Reply With Quote

Old   August 15, 2013, 00:24
Default The errors
  #2
New Member
 
Aydin
Join Date: Jul 2013
Location: Iran
Posts: 3
Rep Power: 13
aydinn is on a distinguished road
Send a message via Yahoo to aydinn
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 is offline   Reply With Quote

Old   August 16, 2013, 21:37
Default
  #3
New Member
 
Aydin
Join Date: Jul 2013
Location: Iran
Posts: 3
Rep Power: 13
aydinn is on a distinguished road
Send a message via Yahoo to aydinn
thanks to every one
I got the problem myself.
It was a mistake made by myself. I wrote "NODE_X" in lower case letters.
jyothsna k likes this.
aydinn is offline   Reply With Quote

Reply

Tags
error, grid_motion, lnk1120, lnk2001, udf


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CGNS Compiling Diego Main CFD Forum 17 December 21, 2014 02:40
using METIS functions in fortran dokeun Main CFD Forum 7 January 29, 2013 05:06
POSDAT problem piotka STAR-CD 4 June 12, 2009 09:43
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug unoder OpenFOAM Installation 11 January 30, 2008 21:30
error while compiling the USER Sub routine CFD user CFX 3 November 25, 2002 16:16


All times are GMT -4. The time now is 17:05.