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

Compile UDF with a C++ compiler

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 7, 2005, 07:24
Default Compile UDF with a C++ compiler
  #1
Luca
Guest
 
Posts: n/a
Hi all! I wonder if it possible to compile a UDF using g++ instead of gcc. I tried to change in the makefile the option CC=cc to CC=g++ but when I compile it gives me some errors related to fluent udf.h file. So the question is: since I have an external library written in C++ how can I link it to my udf which must be written ( I suppose) only in C?Luca
  Reply With Quote

Old   December 7, 2005, 17:19
Default Re: Compile UDF with a C++ compiler
  #2
alex
Guest
 
Posts: n/a
you must compile your C code (not C++). So, you must be sure that you C code is contained in the same folder that your case and date files.

If you are sure about this, you should review the environmental variables on:

control panel/system/advanced options/environmental variables

Here you must write the direction of v1.1 file (this file is contained in program files/C++ files). Click accept, accept and apply.

The last way to compile your UDF is open the VisualC++ toolkit file and run Fluent since here.

Next to it, you can comiple satisfactory your UDF.

I hope that it help you.
  Reply With Quote

Old   December 7, 2005, 21:59
Default Combining C++ code with UDF
  #3
Salim
Guest
 
Posts: n/a
Hi, I have a C++ code and I will combine this code with UDF. Can anyone help me which commands in UDF will use for combining C++ code? Thank you very much
  Reply With Quote

Old   December 8, 2005, 04:25
Default Re: Combining C++ code with UDF
  #4
HVN
Guest
 
Posts: n/a
As I remember and like Alex said, Fluent understand only C and not C++.

The compilers which work with Fluent are listed on www.fluent.com and in the Fluent manual.

HV
  Reply With Quote

Old   December 8, 2005, 06:45
Default Re: Compile UDF with a C++ compiler
  #5
Luca
Guest
 
Posts: n/a
Dear Alex, thank you for your answer. I have no problem in compiling a UDF written in C. I just wanted to compiled a UDF using a C++ compiler. I can compile my UDF using Visual C or gcc but if I try to compile it as it were written in C++, there are some problems related to how Fluent files are defined. Luca
  Reply With Quote

Old   December 8, 2005, 11:20
Default Re: Compile UDF with a C++ compiler
  #6
alex
Guest
 
Posts: n/a
dear Luca, I don't know about the solution of your problem, but if I research something about, I inmediately will send a message ok?
  Reply With Quote

Old   December 8, 2005, 12:21
Default Re: Compile UDF with a C++ compiler
  #7
Luca
Guest
 
Posts: n/a
Thank you Alex! Anyway no problem. I thought of creating a stand alone application written in C++ which is called by my UDF though the operative system. Luca
  Reply With Quote

Old   December 27, 2005, 00:05
Default Re: Compile UDF with a C++ compiler
  #8
owet.L
Guest
 
Posts: n/a
hi,

I heard that a Chinese guy wrote a code to compile the UDF using C++. You can contact him. His name is Peng Huang. email: huangpeng8@163.com

Good luck. Owet
  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 07:05
CFX11 + Fortran compiler ? Mohan CFX 20 March 30, 2011 19:56
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found piprus OpenFOAM Installation 22 February 25, 2010 14:43
udf compile in parallel system tahereh FLUENT 1 December 9, 2008 10:48
compile the UDF Li Jingping FLUENT 2 April 14, 2003 22:18


All times are GMT -4. The time now is 23:07.