LINK errors compiling udf
Hi everyone,
my task is to simulate an oscillating cylinder in vortex shedding conditions. You found in below the UDF and the messages of fluent's console. I'm quite sure about the udf, the cylinder has to oscillate along y with a frequency of 5Hz and an amplitute of 30mm. My issues are related to visual studio end link errors. I started fluent by cross platform visual studio 2017 prompt, both pc and ansys are x64. #include "udf.h" DEFINE_CG_MOTION(object_mov, dt, vel, omega, time, dtime) { real a, w, pi; pi = 3.1415; /* define motion variables */ a = 0.03; /* 30mm movement amplitude */ w = 2 * pi * 5; /* 5Hz frequency */ /* define object movement law */ vel[0] = 0; vel[1] = a * w * sin(w*time); vel[2] = 0; } > Copied D: est_UDF/myUDF.c to libudf\src Creating user_nt.udf file for 2ddp_host ... (system "copy "C:\PROGRA~1\ANSYSI~1\v190\fluent"\fluent19.0.0\sr c\udf\makefile_nt.udf "libudf\win64\2ddp_host\makefile" ") 1 file copiati. (chdir "libudf")(chdir "win64\2ddp_host")# Generating ud_io1.h myUDF.c # Generating udf_names.c because of makefile myUDF.obj udf_names.c # Linking libudf.dll because of makefile user_nt.udf udf_names.obj myUDF.obj Microsoft (R) Incremental Linker Version 14.16.27024.1 Copyright (C) Microsoft Corporation. All rights reserved. Creazione della libreria libudf.lib e dell'oggetto libudf.exp myUDF.obj : error LNK2019: riferimento al simbolo esterno _sin non risolto nella funzione _object_mov myUDF.obj : error LNK2001: simbolo esterno __fltused non risolto LINK : error LNK2001: simbolo esterno __DllMainCRTStartup@12 non risolto C:\PROGRA~1\ANSYSI~1\v190\fluent\fluent19.0.0\mult iport\win64\net\shared\mport.lib : warning LNK4272: il tipo 'x64' del computer della libreria è in conflitto con il tipo 'x86' del computer di destinazione C:\PROGRA~1\ANSYSI~1\v190\fluent\fluent19.0.0\win6 4\2ddp_host\fl1900.lib : warning LNK4272: il tipo 'x64' del computer della libreria è in conflitto con il tipo 'x86' del computer di destinazione C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\li b\x64\LIBCMT.lib : warning LNK4272: il tipo 'x64' del computer della libreria è in conflitto con il tipo 'x86' del computer di destinazione libudf.dll : fatal error LNK1120: 3 esterni non risolti Creating user_nt.udf file for 2ddp_node ... (system "copy "C:\PROGRA~1\ANSYSI~1\v190\fluent"\fluent19.0.0\sr c\udf\makefile_nt.udf "libudf\win64\2ddp_node\makefile" ") 1 file copiati. (chdir "libudf")(chdir "win64\2ddp_node")# Generating ud_io1.h myUDF.c # Generating udf_names.c because of makefile myUDF.obj udf_names.c # Linking libudf.dll because of makefile user_nt.udf udf_names.obj myUDF.obj Microsoft (R) Incremental Linker Version 14.16.27024.1 Copyright (C) Microsoft Corporation. All rights reserved. Creazione della libreria libudf.lib e dell'oggetto libudf.exp myUDF.obj : error LNK2019: riferimento al simbolo esterno _sin non risolto nella funzione _object_mov myUDF.obj : error LNK2001: simbolo esterno __fltused non risolto LINK : error LNK2001: simbolo esterno __DllMainCRTStartup@12 non risolto C:\PROGRA~1\ANSYSI~1\v190\fluent\fluent19.0.0\mult iport\win64\mpi\shared\mport.lib : warning LNK4272: il tipo 'x64' del computer della libreria è in conflitto con il tipo 'x86' del computer di destinazione C:\PROGRA~1\ANSYSI~1\v190\fluent\fluent19.0.0\win6 4\2ddp_node\fl_mpi1900.lib : warning LNK4272: il tipo 'x64' del computer della libreria è in conflitto con il tipo 'x86' del computer di destinazione C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\li b\x64\LIBCMT.lib : warning LNK4272: il tipo 'x64' del computer della libreria è in conflitto con il tipo 'x86' del computer di destinazione libudf.dll : fatal error LNK1120: 3 esterni non risolti Done. I hope you'll help to find a solution. Thx for your time :) |
All times are GMT -4. The time now is 19:46. |