-
-
April 10, 2024 at 4:27 pm
315914335
SubscriberI have a udf that has compiled successfully under windows, but the same c file fails to compile under linux. Please tell me how to solve this problem. My windows version is 2022r1 and 2020r2, and the linux version is 2020r2. Please tell me how to successfully compile this file under linux. Or is it feasible to import the same Windows compiled file into Linux?
-
April 10, 2024 at 4:30 pm
Rob
Forum ModeratorWhat error are you getting? Did you check for whitespace characters?Â
You can't use the Win10 libudf on Linux.Â
-
April 11, 2024 at 3:37 am
315914335
SubscriberWorking...for d in lnamd64/[23]*; do \Â ( \Â Â cd $d; \if [ -f udf_names.c ]; then \Â Â Â Â Â Â Â Â Â mv -f udf_names.c udf_names.cRenamed; \Â Â Â Â Â Â Â Â fi; \rm -rf *.{c,h,cpp,hpp}; \if [ -f udf_names.cRenamed ]; then \Â Â Â Â Â Â Â Â Â mv -f udf_names.cRenamed udf_names.c; \Â Â Â Â Â Â Â Â fi; \Â Â for f in ../../src/*.{c,h,cpp,hpp} ../../src/makefile ../../src/user.udf; do \Â Â Â if [ -f $f -a ! -fbasename $f
]; then \Â Â Â Â echo "# linking to" $f "in" $d; \Â Â Â Â ln -s $f .; \Â Â Â fi; \Â Â done; \Â Â echo ""; \Â Â echo "# building library in" $d; \Â Â if [ "" = "1" ]; then \echo "# using gcc64"; \make ARCHC=gcc64 -k>makelog 2>&1; \Â Â else \if [ "" = "1" ]; then \echo "# using gcc"; \make ARCHC=gcc -k>makelog 2>&1; \else \make -k>makelog 2>&1; \fi; \Â Â fi;\Â Â cat makelog; \Â ) \done# linking to ../../src/rate_bfer.c in lnamd64/3ddp_host# linking to ../../src/makefile in lnamd64/3ddp_hostÂ# building library in lnamd64/3ddp_hostmake[1]: Entering directory `/home/data/lv/test/density-based/rate1/lnamd64/3ddp_host' -
April 11, 2024 at 9:26 am
Rob
Forum ModeratorNothing diagnostic there, if the code has a problem I'd expect some errors.Â
-
Viewing 3 reply threads
- The topic ‘Complied UDF in linux and windows’ is closed to new replies.
Ansys Innovation Space
Trending discussions
- air flow in and out of computer case
- Varying Bond model parameters to mimic soil particle cohesion/stiction
- Eroded Mass due to Erosion of Soil Particles by Fluids
- Guidance needed for Conjugate Heat Transfer Analysis for a 3s3p Li-ion Battery
- Centrifugal Fan Analysis for Determination of Characteristic Curve
- I am doing a corona simulation. But particles are not spreading.
- Issue to compile a UDF in ANSYS Fluent
- JACOBI Convergence Issue in ANSYS AQWA
- affinity not set
- Resuming SAG Mill Simulation with New Particle Batch in Rocky
Top Contributors
-
3862
-
1414
-
1231
-
1118
-
1015
Top Rated Tags
© 2025 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.