Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics
Open CASCADEShowroomGet it!Developer CornerSupport and ProductsAbout us
Technical overview
Areas of use
Advantages
FAQ
Screenshots
Shape factory
Shape gallery
Demonstrations
What's new
System requirements
Download Center
Public license
Documentation
Getting started
Forums
Open Source community
Training and e-learning
A-la Carte Support
Value-added software
Complementary Components
Customer Corner
Company Profile
Marketing Materials
Contact Us
News
Home / Developer Corner / Forums / Unsorted projects / fdstream-problem using ImproveCascade&OpenCascade51

fdstream-problem using ImproveCascade&OpenCascade51

fdstream-problem using ImproveCascade&OpenCascade51
H Hahn 2003/10/30 10:05
Hi,

I've got an problem using ImproveCascade with OpenCascade51.

When compiling the draw-workspace I get the error:

Draw_Main.cxx
..\..\inc\fdstream.hpp(90) : error C2512: 'basic_ostream<char,struct std::char_traits<char> >' : no appropriate default constructor available
..\..\inc\fdstream.hpp(90) : error C2614: 'fdostream' : illegal member initialization: 'ostream' is not a base or member
..\..\inc\fdstream.hpp(109) : error C2258: illegal pure syntax, must be '= 0'
..\..\inc\fdstream.hpp(109) : error C2252: 'pbSize' : pure specifier can only be specified for functions
..\..\inc\fdstream.hpp(110) : error C2258: illegal pure syntax, must be '= 0'
..\..\inc\fdstream.hpp(110) : error C2252: 'bufSize' : pure specifier can only be specified for functions
..\..\inc\fdstream.hpp(111) : error C2065: 'bufSize' : undeclared identifier
..\..\inc\fdstream.hpp(111) : error C2065: 'pbSize' : undeclared identifier
..\..\inc\fdstream.hpp(111) : error C2057: expected constant expression
..\..\inc\fdstream.hpp(111) : warning C4200: nonstandard extension used : zero-sized array in struct/union
..\..\inc\fdstream.hpp(179) : error C2229: class 'boost::fdistream' has an illegal zero-sized array

I'm using VC++6.0 and the fdstream.hpp from the linked site.

(BTW. fixed the problem with the 'flush'-variable in 5.1 by renaming it to 'aflush'. So I think that coulden't be the problem!? )

Thanks for any help!!

Ciao

hhahn
Patrik Müller 2003/10/30 10:13
Hm,

with VC6 I would recommend using STLPort. Perhaps this helps. But I'm not sure if ImproveCascade works with 5.1

Patrik
H Hahn 2003/10/30 10:59
Hi,

just downloaded STL-port and tried it. Still the same error!

Id compiled the lib's, put the stlport folder in my include-path ( first-place ) and the lib folder in my lib path.

Is there anything I missed?

Ciao

hhahn
Conrad J Poelman 2003/10/30 16:11
Hi again,

I don't see any clear answers from looking at your compiler output and the fdstream.hpp file. I've never tried using fdstream.hpp with Visual Studio 6.0. You could try making a separate little one-file project and #include "fdstream.hpp" to see if it compiles under 6.0 when separated from Open Cascade.

It seems strange to me that the fdstream.hpp code uses "std::" in front of everything, but your first error message just says "basic_ostream" has no default constructors instead of saying "std::basic_ostream". I'm pretty sure with MSVS .NET and later, it prints the full namespace qualifier in the error messages, I don't remember if MSVS 6.0 did that or not.

Perhaps Open Cascade 5.1 #defines some macros that are interfering with fdstream.hpp? Hopefully they didn't "#define std", i.e. define std to be nothing, or something crazy like that...

Unfortunately I won't be able to take a look at this myself until later next week. Let me know if you discover anything else.

-- Conrad
H Hahn 2003/11/03 10:39
Hi,

I just want to give you an update on the issue.

I'd made the test you suggested ( testproject, which includes fdstream ),
I wasn't able to compile the project, so it seems it's an VC++6.0 problem.
Compiling OpenCascade5.0 give's me the same error, so it definitely not an OC Problem.
Sorry for causing the confusion!

Thanks for your help!

Ciao

hhahn
H Hahn 2003/11/06 09:35
Hi!

Just got some emails from people with the same problem, asking for help.

Havn't found a good solution jet, and I'm not sure if I understand enough C++-internals to fix the problem.

The workaround I'm using is to avoid the "using namespace ..." directive. Just include the headerfile the normal way. I know it's a bit akward, because you always has to put std:: in front of every declaration ( std::vector aVector; ).

It was anounced the nextversion of OCC will support newSTL headers.
http://www.opencascade.com/community/forum/thread_5189/
So I'm waiting ;-)

Any other solution is welcome!

Ciao

Holger
 
 
Latest news
  • Open CASCADE Technology 6.7.1 is available for download!
  • Open CASCADE Technology 6.7.0 is available for download!
  • Open CASCADE Technology 6.6.0 is available for download!

  • © OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map