|
[Sponsors] |
June 15, 2007, 12:54 |
Compilation error with C++ header file
|
#1 |
Guest
Posts: n/a
|
Hello again
When I tried to compile a UDF with a < iostream.h > as one of the header file using interpreted method in Fluent, it gave error: Error: iostream: line 14: parse error. and when I tried to compile it using shared library, it built a shared library with this error message: "C:\Programme\Microsoft Visual Studio\VC98\Include\eh.h(32) : fatal error C1189: #Fehler : "eh.h is only for C++!" and when I tried to link this build library it gave this error message: Opening library "libudf"... "Error: open_udf_library: The system cannot find the indicated file." Could someone please explain what preliminary steps required to be followed to link/use C++ functions and programs with UDF in Fluent. Regards Jack Martinez. |
|
June 15, 2007, 20:33 |
Re: Compilation error with C++ header file
|
#2 |
Guest
Posts: n/a
|
Jack,
As for UDF, I recommend you to use plain C, instead of C++. Therefore use use stdio.h functions for reading, writing, parsing etc... As for iostream.h, new visual studio have some changes in default libraries and if i remember well you should do #include <iostream> instead of #include <iostream.h>. Another thing is: DO NOT USE interpreted version, but USE compiled version method in Fluent if you want to use external c/c++ features... internal compiler is very limited, remember about it... kindest regards, Tomasz |
|
June 16, 2007, 09:40 |
compatibility of C++ with UDF (FLUENT )!
|
#3 |
Guest
Posts: n/a
|
Hello Tomasz,
Many thanks for ur reply.. I have to use C++ along with my UDF in Fluent as I said before I have to postprocess fluent result for radiation modeling and further.. I even tried to implement it using compilation method but it didn't work out... Does modifyiing the env variables or including some header file in the path can lead to solution... I am currently working in Windows but finaly I have to implement it in Linux ... Regards Jack |
|
June 16, 2007, 10:27 |
Re: compatibility of C++ with UDF (FLUENT )!
|
#4 |
Guest
Posts: n/a
|
Jack,
Under Linux all is simpler and straightforward -> GNU C/C++ is included by deafult into the system and you really don't need to do anything when using compiled version of UDF, Send your UDF code to my email - I'll check it out if you have not enough experience in C/C++, maybe i'll be able to give you good clues on that, env variables they give only paths for compiler... kindest regards, Tomasz |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
1.7.x Environment Variables on Linux 10.04 | rasma | OpenFOAM Installation | 9 | July 30, 2010 05:43 |
OpenFOAM Install Script | ljsh | OpenFOAM Installation | 82 | October 12, 2009 12:47 |
[Gmsh] Compiling gmshFoam with OpenFOAM-1.5 | BlGene | OpenFOAM Meshing & Mesh Conversion | 10 | August 6, 2009 05:26 |
Problem with rhoSimpleFoam | matteo_gautero | OpenFOAM Running, Solving & CFD | 0 | February 28, 2008 07:51 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 18:51 |