-
-
March 5, 2020 at 11:15 pm
ag1991
SubscriberHello, I am using ANSYS 2019 R1 on Windows 10 with Microsoft Visual Studio 2017 installed. Whenever I'm attempting to compile a udf file and clic 'build' I get the following messages on the TUI:
Copied
Users...dp0FFFFluent/
Users...dp0FFFFluent1dof_rotation.c to libudfsrc
udf_names.c and user_nt.udf files in 2ddp_host are upto date.
(system "copy "C:PROGRA~1ANSYSI~1v193fluent"fluent19.3.0srcudfmakefile_nt.udf "libudfwin642ddp_hostmakefile" ")
1 copied archive(s).
(chdir "libudf")(chdir "win642ddp_host")# Generating ud_io1.h
1dof_rotation.c
C:PROGRA~1ANSYSI~1v193fluentfluent19.3.0srcmainglobal.h(9): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory
udf_names.c and user_nt.udf files in 2ddp_node are upto date.
(system "copy "C:PROGRA~1ANSYSI~1v193fluent"fluent19.3.0srcudfmakefile_nt.udf "libudfwin642ddp_nodemakefile" ")
1 copied archive(s).
(chdir "libudf")(chdir "win642ddp_node")# Generating ud_io1.h
1dof_rotation.c
Â
C:PROGRA~1ANSYSI~1v193fluentfluent19.3.0srcmainglobal.h(9): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory
As far as I am concerned, I overcame the typical 'nmake' problem but I'm stuck right here, I properly changed the values for the environment variables, it seems like it can't find this stdio header just because it doesn't exist (I have been searching it through all the installed archives from MVS2017). This makes me conclude on there might be some work load or optional component I must missed to install. What are exactly the required ones?
Thank you in advance
PS: I deleted in this message some part of the path due to confidencial reasons, nevertheless, I'd like to make it clear that there are no spaces between words in none of the archives appearing on the path. -
March 6, 2020 at 6:03 pm
Karthik Remella
AdministratorHello,
MS Visual Studio 2017 should work well for Fluent R193. I'm thinking the issue could have been because of the changes you've made to your environment variables. This should never have been done. Please reinstall your compiler, install the SDKs, and remove any custom variables you might have defined. Please let us know how things are behaving once you've done so.
Thank you.
Best Regards,
Karthik
-
March 11, 2020 at 2:41 pm
ag1991
SubscriberHello again, the problem was solved.
The compiler and SDKs were OK, however, the problem came from the environment variables. The ones pre-defined neither weren't the right ones, so I tried to execute Fluent from the MS VS2017 command prompt, succeeding at building and loading the udf. Once there, I typed 'env' on the command prompt and got all of the environment variables.
It appears there were some of them that weren't actually defined, so I had to creat them and then I became able to work with udf archives from ANSYS Fluent. I understand the proper installation of ANSYS should have defined them, but it didn't (there are some .exe called 'setenv' in order to do so).
Thanks.
-
March 11, 2020 at 3:01 pm
Karthik Remella
AdministratorHello,
Could you please mark the answer as 'Is Solution'? I'm sure this is something that might benefit others in the community.
Thank you.
Best Regards,
Karthik -
June 9, 2020 at 8:39 pm
carmendecrescenzo90
SubscriberHello,
I am working on volume rate reaction UDF to add in Fluent. I am usnig Ansys 2019 R3 Academic and Visual Studio Community 2019. After building UDF the following error message appears: "fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory".
And after loading the libudf the error is "Error: The UDF library you are trying to load is not compiled for 2d on the current platform (win64)"
How can I solve these problems?
Thank you in advance
Best regards
Â
Carmen
-
June 10, 2020 at 1:35 pm
Karthik Remella
AdministratorHello,
 Please reinstall your compiler, install the SDKs, and remove any custom environment variables (if any) you might have defined.
This message is indicating that you have not installed the compiler correctly.Â
Also, for better visibility, please create a separate post for each question. This will increase the visibility on your question.
Thanks.
Karthik
-
June 15, 2020 at 2:48 pm
ag1991
SubscriberHi,
try executing Fluent from the MS VS2019Â command prompt and check if you succeed at building and loading the udf. Once there, type 'env' on the command prompt and you'll get all of the environment variables.
Then, define all used env. vars. in their respective Windows menu.
Hope it works.
-
August 4, 2020 at 5:41 pm
Amoghavsomayaji
SubscriberI am facing a problem similar to the above mentioned ones.I have noticed that stdio.h file and udf.bat files are missing.Please explain the solution step by step.I am very new to this software. -
August 6, 2020 at 2:40 pm
Rob
Forum ModeratorTry using the Built in Compiler in 2020R2. As an aside, if you're new to Fluent UDFs are probably not a good starting point. n -
August 14, 2020 at 4:08 am
Amoghavsomayaji
SubscriberThanks a lot,Rob. Built in compiler in 2020R2 is a game changer.n -
March 15, 2021 at 5:46 pm
cfd_learner
SubscriberWill you please explain the steps/environment variables you set?n -
March 21, 2021 at 6:05 pm
ag1991
SubscriberSure, Open Windows command prompt (type 'cmd' on a Windows OS in the 'Search' toolbar). Make sure you've got installed Microsoft Visual Studio 2019, any other versions can run well, but this one worked out fine for me
Execute Fluent from that command shell
Inside Fluent, build and load your UDF. If you are succesful, a libudf directory will be created on your workind directory
Once more, back to the command shell. Type now 'env'. This will show you all of the environment variables defined when you executed Fluent from command shell.
Copy all those environment variables and define them on your system, dully linking them to ANSYS
It's been a long time since I did this, but I believe more or less these should be the steps.nGood luch.
-
- The topic ‘UDF Compilation error cannot open include file ‘stdio.h’’ is closed to new replies.
-
5869
-
1906
-
1420
-
1306
-
1021
© 2026 Copyright ANSYS, Inc. All rights reserved.