CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Fluent UDF and Scheme Programming

compiling udf on windows7 64-bit

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   September 23, 2014, 08:56
Default compiling udf on windows7 64-bit
  #1
Member
 
ad
Join Date: Apr 2014
Posts: 43
Rep Power: 3
adi.ptb is on a distinguished road
i tried to compile a udf on winx64,i did nearlly everything that was out there but nothing seemd to work for me,i kept getting the"Error:The UDF library you are trying to load (libudf) is not compiled for 2ddp on the current platform (win64)" when i run fluent using visual studio x64 command prompt i had this error: win SDk Dir not found,and using the windows7 SDK cmd shell i had this error:the x64 compilers are not currently installed. after a whole week working on it finallay i found the solution heres what you need and what you should do:
my softwares:Ansys fluent15.0(64bit),Microsoft windows7 SDK.Net framework4.0,visual studio 10 ultimate,VC++ 10 express
set your variables as:
(control panel-->system-->advanced system settings-->environment variables-->system variables-->add)
name:Include
value:

:\Program Files\Microsoft SDKs\Windows\v7.1\Include;C:\Program Files (x86)\Microsoft Visual Studio10.0\VC\atlmfc\include;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include
name:Lib
value:C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib\x64;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\lib;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib
name:Libpath
value: C:\Windows\Microsoft.NET\Framework64\v4.30319;C:\W indo ws\Microsoft.NET\Framework64\v2.0.50727;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\lib;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib
this the important one
nameath
value:C:\Program Files\ANSYS Inc\v150\fluent\ntbin\win64;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin;C:\Windows\Microsoft.NET\Framework64\v 4 .30319;C:\Windows\Microsoft.NET\Framework64\v2.0.5 0727 ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcpackages;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools;C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\x64;C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin;"C:\Windows\System32"
the red one is the whole solution
after setting your environment variables run fluent from SDK cmd shell:
start-->all programs-->microsoft windows SDK v7.1-->windows SDK 7.1 command prompt
then go to your working directory where your cas and c files are then copy the address of your working directory for example my working directory is (C:\Users\edi\Desktop\kkk)
in command prompt type:cd (right click and paste your working directory address) for example:cd
C:\Users\edi\Desktop\kkk
press enter then type fluent then press enter
after that read your mesh file and compile your udf
cheers
adi.ptb is offline   Reply With Quote

Old   November 26, 2014, 14:30
Default
  #2
New Member
 
Ana Marķa Mosquera
Join Date: Nov 2014
Posts: 2
Rep Power: 0
ana_mg is on a distinguished road
Hi, I also was trying with this modification and adding the same variables:
name:Include
value:c:\Program Files\Microsoft SDKs\Windows\v7.1\Include;C:\Program Files (x86)\Microsoft Visual Studio10.0\VC\atlmfc\Include;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Include
name:Lib
value:C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib\x64;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\lib;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib
name:Libpath
value: C:\Windows\Microsoft.NET\Framework64\v4.0.30319;C:\Windows\Microsoft.NET\Framework64\v2.0.5 0727;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\lib;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib

name: path
value:C:\Program Files\ANSYS Inc\v150\fluent\ntbin\win64;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin;C:\Windows\Microsoft.NET\Framework64\v 4.0.30319;C:\Windows\Microsoft.NET\Framework64\v2. 0.5 0727 ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcpackages;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools;C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\x64;C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin;"C:\Windows\System32"

Are you sure that the last part is correct? Probably it should be ;C:<working directory> not the "C:\Windows\System32"

Thanks
ana_mg is offline   Reply With Quote

Old   November 27, 2014, 11:10
Default
  #3
Member
 
ad
Join Date: Apr 2014
Posts: 43
Rep Power: 3
adi.ptb is on a distinguished road
I'm positive
adi.ptb is offline   Reply With Quote

Old   March 10, 2015, 11:28
Default
  #4
New Member
 
Join Date: Mar 2015
Posts: 9
Rep Power: 2
dtmith is on a distinguished road
Awesome, thanks! I've spent ages trying to get parallel compiling working in Windows 7 64 bit with ansys 15. I've done so many things I'm not exactly sure which ones are necessary, but I used all your environment variables, modified to work with Visual Studio 12 and SDK v7.0 instead of v7.1, I couldn't find and folders labelled "atlmfc" so I left those out but it worked fine anyway.

For people having similar issues, I also followed this (in addition to adding all the environment variables mentioned here)
http://www.simutechgroup.com/CFD/com...5-or-15-0.html

With the slight modification that I ran fluent through the "Microsoft Windows SDK v7.0" command prompt rather than the Visual Studio one.

Now I just have to figure out how to write my UDF to do what I want, but at least it's compiling now!
dtmith is offline   Reply With Quote

Old   June 23, 2015, 11:58
Default
  #5
New Member
 
Ericson
Join Date: Jun 2015
Posts: 7
Rep Power: 2
Ericson is on a distinguished road
Where is the place for adding the variables?
User variables or System variables...
Ericson is offline   Reply With Quote

Old   June 24, 2015, 03:16
Default
  #6
Member
 
ad
Join Date: Apr 2014
Posts: 43
Rep Power: 3
adi.ptb is on a distinguished road
system variables
adi.ptb is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
compiling my Udf noa Fluent UDF and Scheme Programming 6 November 2, 2012 07:52
error in compiling udf sugumaran Fluent UDF and Scheme Programming 5 August 26, 2010 15:25
compiling linked udf (C/fortran mixed) bawfuls Fluent UDF and Scheme Programming 0 July 13, 2010 16:53
Compiling UDF in Fluent 12 jsm FLUENT 1 July 22, 2009 07:40
Udf compiling problem ranjit FLUENT 6 February 15, 2007 14:19


All times are GMT -4. The time now is 08:50.