CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Bugs

OpenFOAM 14 problem with file readSTLASCIIL

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 12, 2007, 19:36
Default Hello all, Here is a small
  #1
Senior Member
 
Martin Beaudoin
Join Date: Mar 2009
Posts: 330
Rep Power: 13
mbeaudoin will become famous soon enough
Hello all,

Here is a small adjustment proposed to OpenFOAM 1.4 source code.

File : OpenFOAM-1.4/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L

Line : 169:

Original source code: word solidName(string::validate<word>(YYText()));

Proposed change : word solidName(Foam::string::validate<word>(YYText()));

Problem description :
SuSE 10.1 comes with flex++ version 2.5.31-16

With an older version of flex++ (version 2.5.4a-33 from RedHat Fedora Core 3), line 169 generates the following error messages when parsed through flex++ while compiling the library triSurface:

triSurface/interfaces/STL/readSTLASCII.L:169: error: reference to "string" is ambiguous
/home/math/pub/OpenFOAM/OpenFOAM-1.4/src/OpenFOAM/lnInclude/string.H:64: error: candidates are: class Foam::string
/home/math/pub/OpenFOAM/linux/gcc-4.1.2/lib/gcc/i686-pc-linux-gnu/4.1.2/../../.. /../include/c++/4.1.2/bits/stringfwd.h:60: error: typedef struct std::basic_string<char, std::char_
traits<char>, std::allocator<char> > std::string
triSurface/interfaces/STL/readSTLASCII.L:169: erreur: expected primary-expression before token

Solution:
The solution is quite simple: you just need to tell flex++ which "flavor" of the class string you need; in this case, we need Foam::string.

The proposed patch should work for any version of flex++.

Enjoy,

Martin
mbeaudoin is offline   Reply With Quote

Old   April 13, 2007, 02:33
Default Good point, we noticed a simil
  #2
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 13
henry is on a distinguished road
Good point, we noticed a similar problem when a new version of the fluentMeshToFoam we are developing was compiled on RedHat. Did you notice any problems compiling any of the other .L files in 1.4?

Henry
henry is offline   Reply With Quote

Old   April 13, 2007, 21:09
Default Nope, the rest of 1.4 compiled
  #3
Senior Member
 
Martin Beaudoin
Join Date: Mar 2009
Posts: 330
Rep Power: 13
mbeaudoin will become famous soon enough
Nope, the rest of 1.4 compiled just fine on that RedHat system.

Still need to adjust for the "demangle.h" problem on non Suse systems, but the solution to that problem is now well documented on this mailing list, and in the recompilation Howto on openfoamwiki.net.

Martin
mbeaudoin 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
Flex and readSTLASCIIL podallaire OpenFOAM Installation 2 June 1, 2010 17:00
ParaView 33 canbt open OpenFoam file hariya03 OpenFOAM Paraview & paraFoam 7 September 25, 2008 17:33
Conversion Fluent cas and dat file to OpenFoam matteo_gautero OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 9 April 3, 2008 02:32
OPENFoam File Format as XML A Wishlist iyer_arvind OpenFOAM 2 January 2, 2008 05:39
IDEAS universal file convert to OpenFOAM hsieh OpenFOAM Meshing & Mesh Conversion 0 April 18, 2006 13:57


All times are GMT -4. The time now is 14:56.