|
[Sponsors] |
The proper way of installing Visual Studio for UDF compilation 2023 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 19, 2023, 04:18 |
The proper way of installing Visual Studio for UDF compilation 2023
|
#1 |
New Member
Join Date: Feb 2023
Posts: 2
Rep Power: 0 |
I've been struggling for a week trying to solve a compilation problem. The problem was due to incorrect VS installation. I am a little resentful about the fact that such meager information is designated to this topic (even in Fluent guidelines), hence I decided to make this thread, share my solution and some thoughs.
1. Download VS installer. I use 2019 version, but I am pretty sure it works for the latest 2022 version as well (at least udf.bat script is looking for 2022 build instruments). And of course it should work for previous VS versions. 2. In the installer under Workloads page choose Desktop development with C++ and Universal Windows platform development. This is important. My whole headache was because of this. 1.jpg 3. Launch Fluent via command prompt for VS. 3.1 Find Developer Command Prompt for VS 2019 in the Start menu or just type in the search bar (it could be named different for your version of VS). 2.png 3.2 Navigate to your project directory via cd command. 3.3 Type fluent command. Some technical discourse: personally I don't understand why there is a reason to launch Fluent via VS command prompt, because when you press Build button in Fluent, it starts udf.bat script which is essentially just doing the same thing for you. After following these steps my problem was solved. Hope it will help somebody. |
|
March 10, 2024, 13:58 |
|
#2 |
New Member
Alejandro
Join Date: Aug 2023
Posts: 1
Rep Power: 0 |
Hi there, I´m currently having problems trying to use an UDF in Ansys Fluent and I tried nearly everything I could find related to Ansys Fluent.
I tried what you explained but it didnt work out for me either. I am going to quote the error I am getting, maybe some of you out there can help me out on this issue since I am still learning Ansys. Thanks in Advance ERROR: The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform (win64). |
|
March 17, 2024, 17:16 |
|
#3 | |
New Member
Niall
Join Date: Mar 2024
Posts: 4
Rep Power: 2 |
Quote:
uvdose_par.c(42,50): error: member reference base type 'void' is not a structure or union par_fprintf_head(fp,"(%s %d)\n",thread->head->dpm_summary.sort_file_name,14); It seems to indicate that line " par_fprintf_head(fp,"(%s %d)\n",thread->head->dpm_summary.sort_file_name,14);" of my code below has a problem. Would you possibly know how to solve this error? I believe solving this error will also help load for parallel use on the current platform. Many thanks. Niall |
||
Tags |
compilation, compilation error, fluent, udf, visual studio |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SU2-7.0.1 on ubuntu 18.04 | hyunko | SU2 Installation | 7 | March 16, 2020 05:37 |
The udf.h headers are unable to open- in VISUAL STUDIO 13 | sanjeetlimbu | Fluent UDF and Scheme Programming | 4 | May 2, 2016 06:38 |
CFX11 + Fortran compiler ? | Mohan | CFX | 20 | March 30, 2011 19:56 |
How to install CGNS under windows xp? | lzgwhy | Main CFD Forum | 1 | January 11, 2011 19:44 |
CGNS lib and Fortran compiler | manaliac | Main CFD Forum | 2 | November 29, 2010 07:25 |