-
-
April 10, 2024 at 4:27 pm315914335Subscriber
I 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 pmRobForum Moderator
What 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 am315914335SubscriberWorking...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 ! -f
basename $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 amRobForum Moderator
Nothing 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
- How do I get my hands on Ansys Rocky DEM
- Non-Intersected faces found for matching interface periodic-walls
- Fluent fails with Intel MPI protocol on 2 nodes
- Unburnt Hydrocarbons contour in ANSYS FORTE for sector mesh
- Help: About the expression of turbulent viscosity in Realizable k-e model
- Cyclone (Stairmand) simulation using RSM
- Mass Conservation Issue in Methane Pyrolysis Shock Tube Simulation
- Facing trouble regarding setting up boundary conditions for SOEC Modeling
- Script Error
- convergence issue for transonic flow
Top Contributors
-
1727
-
624
-
599
-
591
-
366
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.