Compiling UDF in windows 7
I have problem compiling UDFs in windows 7.
Has anyone knows a step by step instruction to figure it out?
I tried this one, did not work. Can you explain the instruction in details?
Install Visual Studio. Most of the time the Visual C++ 2008 Express Edition  is recommended. On my system it even works with the new Visual Studio 2010 Professional Release Candidate .
Set the correct environment variables. Browse your way through the Windows system control to 'System'. There you will find a section 'Advanced system settings'. In the following dialog go to the 'Advanced' tabulator and click on 'Environment variables' (lower right corner). Go through the 'System variables' list and search for the 'Path' entry. Add the following to the variable: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin;C:\Program Files\ANSYS Inc\v120\fluent\ntbin\win64. Adjust this entry to your system concerning the installation directories! The Visual Studio entry should point to the location where 'nmake' is located.
Install a Software Development Kit (SKD) for 64bit systems. This may be the difference between 32bit and 64bit systems. I have used the .NET Framework 2.0 Software Development Kit (SDK) (x64) from 2006  because it is explicitly for 64bit systems and I was not sure if more recent versions are for 64bit systems as well.
Start FLUENT from the SDK command prompt. Do not use the Visual Studio command prompt, use the SDK command prompt! Go to the directory your case is in and type 'fluent'.
you've been walking a long long road man!!!
Sorry but Almost all of the steps you mentiond are futile!
Do As I say:
1-Install Visual studio 2008(you already did it!)
2-Start Fluent by this version command prompt.
And you are there!! Now you can compile your UDF directly within Fluent.
Thank you for your response.
I did what you told me but I did not get anywhere.
Have you tried that with ANSYS, FLUENT Version 13.0? Because I tried and did not work. Please help me in compiling the UDF in windows 7, Its very important for me. Thanks.
Regardless how much effort you put on running parallel or etc.
Try with Fluent 6.3 and be sure you will make it!
Let me know about the process. Goodluck.
I was in the same boat a couple of months ago. What you have do to is basically all described there :
Since you already made the changes to your system variables, all that you have to do is edit the udf.bat file (can't remember exact location - search for it)
Hope that helps!
I already have Microsoft Visual Studio installed. Should I reinstall
Having Microsoft Visual Studio installed is good. No need to reinstall.
Like I said: modify the udf.bat file that setups your compulation environment. You can locate it using the Fluent launcher (see the Environment tab, look for something like : C:\Program Files\ANSYS Inc\v130\fluent\ntbin\win64\udf.bat). Open that file and edit it :
1) Add, before the reference to MS VC 9.0 :
set MSVC_DEFAULT=%ProgramFiles%\Microsoft Visual Studio 10.0
if exist "%MSVC_DEFAULT%\vC\vcvarsall.bat" set MSVC=%MSVC_DEFAULT%
if not "%MSVC%" == "" goto msvc_env10
2) Then, scroll to the bottom and add :
call "%MSVC%\VC\vcvarsall.bat" amd64
Adjust every values according to your system setup (ie x84 vs x64, paths, etc) and you should be done.
|All times are GMT -4. The time now is 17:47.|