|
[Sponsors] |
July 3, 2016, 06:00 |
problem with printf and Massage
|
#1 |
Member
Davoud Malekian
Join Date: Jan 2016
Posts: 53
Rep Power: 10 |
hi guys,
im writing a UDF that should be compiled and not interpret, and i know that when i want to print something to consol i should use "Massage" instead of "printf" , but the problem is when i use "Massage" i face with an unsuall error by compiler that says: newmotion.obj : error LNK2019: unresolved external symbol Massage referenced in ... libudf.dll : fatal error LNK1120: 1 unresolved externals but when i use printf there is no such error when compiling but nothing is shown in the consol, Does anyone have any idea to help me get around this problem, tnx here is the udf just in case it may help: #include "udf.h" #include "sg.h" static real y = 0; static int i = 0; real avg; DEFINE_CG_MOTION(Disk, dt, vel, omega, time, dtime) { Thread *t; face_t f; real x[ND_ND]; NV_S(vel, =, 0); NV_S(omega, =, 0); t = DT_THREAD(dt); begin_f_loop(f,t) { F_CENTROID(x,f,t); y = y + x[1]; i = i + 1; } end_f_loop(f,t) avg = y * (1./i); Massage("dis: %g \n",avg); if (avg > -0.0645) vel[1] = (-1)*time*9.81; else vel[1] = 0; } |
|
July 3, 2016, 08:31 |
|
#2 |
Senior Member
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 13 |
Massage is something people do to relief muscular pain or something like that. Try to use Message instead, I think it will work.
|
|
July 7, 2016, 12:01 |
|
#3 |
Senior Member
Rick
Join Date: Oct 2010
Posts: 1,016
Rep Power: 27 |
Great!
|
|
Tags |
udf error printf massage |
|
|