|
[Sponsors] |
December 7, 2005, 07:24 |
Compile UDF with a C++ compiler
|
#1 |
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
|
|
December 7, 2005, 17:19 |
Re: Compile UDF with a C++ compiler
|
#2 |
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. |
|
December 7, 2005, 21:59 |
Combining C++ code with UDF
|
#3 |
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
|
|
December 8, 2005, 04:25 |
Re: Combining C++ code with UDF
|
#4 |
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 |
|
December 8, 2005, 06:45 |
Re: Compile UDF with a C++ compiler
|
#5 |
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
|
|
December 8, 2005, 11:20 |
Re: Compile UDF with a C++ compiler
|
#6 |
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?
|
|
December 8, 2005, 12:21 |
Re: Compile UDF with a C++ compiler
|
#7 |
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
|
|
December 27, 2005, 00:05 |
Re: Compile UDF with a C++ compiler
|
#8 |
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 |
|
|
|
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 |