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

Re: ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 14, 2008, 15:49
Default Re: ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM
  #1
Kirlangic
Guest
 
Posts: n/a
Problems:

1. 'nmake' is not recognized as an internal or external command, operable program or batch file

2. c:\fluent.inc\fluent6.3.26\src\config.h(119) : error C2143: syntax error : missing '{' before ':'

3. c:\fluent.inc\fluent6.3.26\src\config.h(119) : error C2059: syntax error : ':'

4. c:\fluent.inc\fluent6.3.26\cortex\src\dll.h(58) : error C2061: syntax error : identifier 'CX_DLL_GetProc'

5. c:\fluent.inc\fluent6.3.26\cortex\src\dll.h(58) : error C2059: syntax error : ';'

6. c:\fluent.inc\fluent6.3.26\cortex\src\dll.h(58) : error C2059: syntax error : 'type'

7. LINK : fatal error LNK1104: cannot open file "kernel32.lib"

8. valve.obj : error LNK2019: unresolved external symbol __imp_Compute_Force_And_Moment referenced in function f_valve

9. valve.obj : error LNK2019: unresolved external symbol __imp_Lookup_Thread referenced in function f_valve

etc, etc..

I had the similar compiling problems on 64 bit Windows Vista with Microsoft Visual Studio 9.0.

The final solution that worked for me is easy. You don't touch any system and environment variables or change any default settings or installation folders (at least by hand)

Step 1: Launch "Visual Studio 2008 x64 Cross Tools Command Prompt" which is under All Programs > Microsoft Visual Studio 2008 > Visual Studio Tools (http://msdn.microsoft.com/en-us/library/76712d27.aspx)

Step 2: Run vcvarsall.bat from this command prompt. This file is most probaly at "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" (http://msdn.microsoft.com/en-us/library/x4d2c09s.aspx)

Step 3. Run fluent from this command prompt. It will work fine..

Regards,

Ozgur
  Reply With Quote

Old   April 20, 2011, 04:26
Default
  #2
New Member
 
alven
Join Date: Mar 2009
Location: Malaysia
Posts: 25
Blog Entries: 1
Rep Power: 17
alven299 is on a distinguished road
Hi Kirlangic,

I'm experiencing the same problems: 2-6. I'm using xp 64 bit and MS visual studio 9.0. I have followed your steps but still couldn't resolve the issue. I'm wondering perhaps it is my UDF that has problem. Could you please try to compile the following UDF in your computer and see whether it works? Also, do I need a header file for the compilation process? If yes, do I copy it from the fluent6.3.26\src\ folder?

here is my UDF:

#include "udf.h"
DEFINE_PROFILE(inlet_temperature,t,i)
{real time;face_t f;
begin_f_loop(f,t)
{time=CURRENT_TIME;if(time<2)
F_PROFILE(f,t,i)=300;else
F_PROFILE(f,t,i)=340;
}end_f_loop(f,t)}

Many thanks.
alven299 is offline   Reply With Quote

Old   April 2, 2012, 22:03
Default
  #3
New Member
 
Ngô Ích Sơn
Join Date: Apr 2010
Location: Anseong, Korea
Posts: 8
Rep Power: 16
manowars is on a distinguished road
Hi all

Same here, I followed your steps. However, the error still occurred.
I am using OS windows xp 64 bit and MS visual C 2010.
Here is my steps:

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>vcvarsall.bat
Setting environment for using Microsoft Visual Studio 2010 x86 tools.

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>C:\Fluent.Inc\ntbin\win64
\fluent.exe -r6.3.26

Many thanks
Regards,
manowars is offline   Reply With Quote

Old   April 5, 2012, 10:23
Default
  #4
New Member
 
alven
Join Date: Mar 2009
Location: Malaysia
Posts: 25
Blog Entries: 1
Rep Power: 17
alven299 is on a distinguished road
I upgraded my FLUENT to v12 and problem solved. No more UDF compiling issue.
alven299 is offline   Reply With Quote

Old   April 10, 2012, 06:59
Default
  #5
New Member
 
wu
Join Date: Feb 2012
Posts: 1
Rep Power: 0
worldexpress is on a distinguished road
Quote:
Originally Posted by alven299 View Post
I upgraded my FLUENT to v12 and problem solved. No more UDF compiling issue.
How to set environment variables for compile in fluent 12.thank you.My fluent is v12,and vs is v2010.
worldexpress is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM Rizwan Fluent UDF and Scheme Programming 40 March 18, 2018 06:05
Radial fan problem : Attn Razvan and all Farhath FLUENT 0 September 26, 2007 04:18
Kind attn:problem in DEFINE_SOURCE in my UDF Phanindra FLUENT 1 February 23, 2007 09:03
about compile problem stanta Siemens 0 July 9, 2005 23:19
udf compile problem inhalation FLUENT 0 May 13, 2004 03:41


All times are GMT -4. The time now is 22:30.