[SOLVED] 'ostream' is not a member of 'std'

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

User avatar
BrightBit
Not too shy to talk
Not too shy to talk
Posts: 35
Joined: Mon May 30, 2011 03:30
Contact:

[SOLVED] 'ostream' is not a member of 'std'

Postby BrightBit » Sun Sep 01, 2013 11:52

Compiling my own project results in the error message:

error C2039: 'ostream' : is not a member of 'std' C:\Programming\Install\cegui\include\cegui-0\CEGUI\Base.h 183

My problem seems to be similar to this one on the Ogre forums: CEGUI 0.8.1 bugged? except that I am already using CEGUI 0.8.2.

Code: Select all

1>------ Build started: Project: ZERO_CHECK, Configuration: Release x64 ------
2>------ Build started: Project: svnheader, Configuration: Release x64 ------
2>  -- Found Subversion: C:/Program Files/TortoiseSVN/bin/svn.exe (found version "1.7.4")
3>------ Build started: Project: bnb, Configuration: Release x64 ------
3>cl : Command line warning D9002: ignoring unknown option '-g'
3>cl : Command line warning D9030: '/showIncludes' is incompatible with multiprocessing; ignoring /MP switch
3>  main.cpp
3>  Note: including file: c:\programming\bnb\src\../include/Application.h
3>  Note: including file:  c:\programming\bnb\include\Prerequisites.h
3>  Note: including file:   C:/Programming/Builds/ogre/sdk/include/OGRE\OgrePrerequisites.h
3>  Note: including file:    c:\programming\builds\ogre\sdk\include\ogre\OgrePlatform.h
3>  Note: including file:     c:\programming\builds\ogre\sdk\include\ogre\OgreConfig.h
3>  Note: including file:      c:\programming\builds\ogre\sdk\include\ogre\OgreBuildSettings.h
3>c:\programming\builds\ogre\sdk\include\ogre\OgrePlatform.h(236): warning C4668: 'OGRE_PLATFORM_FLASHCC' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
3>c:\programming\builds\ogre\sdk\include\ogre\OgrePlatform.h(281): warning C4668: 'OGRE_PLATFORM_FLASHCC' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
3>  Note: including file:    C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string
3>  Note: including file:     C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\iterator
3>  Note: including file:      C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\istream
3>  Note: including file:       C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ostream
3>  Note: including file:        C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ios
3>  Note: including file:         C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xlocnum
3>  Note: including file:          C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\climits
3>  Note: including file:           C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\yvals.h
3>  Note: including file:            C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xkeycheck.h
3>  Note: including file:            C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\crtdefs.h
3>  Note: including file:             C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\sal.h
3>  Note: including file:              C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ConcurrencySal.h
3>  Note: including file:             C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vadefs.h
3>  Note: including file:            C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\use_ansi.h
3>  Note: including file:           C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\limits.h
3>  Note: including file:            C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\crtdefs.h
3>  Note: including file:          C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath
3>  Note: including file:           C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\math.h
3>  Note: including file:            C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\crtdefs.h
3>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\math.h(39): warning C4820: '_exception' : '4' bytes padding added after data member '_exception::type'
3>  Note: including file:           C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xtgmath.h
3>  Note: including file:            C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xtr1common
3>  Note: including file:          C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cstdio
3>  Note: including file:           C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\stdio.h
3>  Note: including file:            C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\crtdefs.h
3>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\stdio.h(59): warning C4820: '_iobuf' : '4' bytes padding added after data member '_iobuf::_cnt'
3>  Note: including file:            C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\swprintf.inl
3>  Note: including file:          C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cstdlib
3>  Note: including file:           C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\stdlib.h
3>  Note: including file:            C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\crtdefs.h
3>  Note: including file:          C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\streambuf
3>  Note: including file:           C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xiosbase
3>  Note: including file:            C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xlocale
3>  Note: including file:             C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cstring
3>  Note: including file:              C:/Programming/Install/cegui/include/cegui-0/CEGUI\string.h
3>  Note: including file:               C:/Programming/Install/cegui/include/cegui-0\CEGUI/Base.h
3>  Note: including file:                C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cassert
3>  Note: including file:                 C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\assert.h
3>  Note: including file:                  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\crtdefs.h
3>  Note: including file:                C:/Programming/Install/cegui/include/cegui-0\CEGUI/Config.h
3>  Note: including file:                C:/Programming/Install/cegui/include/cegui-0\CEGUI/Version.h
3>C:/Programming/Install/cegui/include/cegui-0\CEGUI/Base.h(183): error C2039: 'ostream' : is not a member of 'std'
3>C:/Programming/Install/cegui/include/cegui-0\CEGUI/Base.h(183): error C2146: syntax error : missing ';' before identifier 'OutStream'
3>C:/Programming/Install/cegui/include/cegui-0\CEGUI/Base.h(183): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>  Note: including file:                C:/Programming/Install/cegui/include/cegui-0\CEGUI/ForwardRefs.h
...

Any ideas on what I've done wrong?

Note: My OS is Windows 7 64bit, I am using Ogre 1.9.0 and my build system is Microsoft Visual Studio 2012 Express.
Last edited by BrightBit on Sun Sep 01, 2013 22:14, edited 1 time in total.
"Yeah so if you ever need info about anyone [...] Just ask. [...] They 'trust me'. Dumb fucks." - Mark Zuckerberg (Facebook CEO)

User avatar
BrightBit
Not too shy to talk
Not too shy to talk
Posts: 35
Joined: Mon May 30, 2011 03:30
Contact:

Re: 'ostream' is not a member of 'std'

Postby BrightBit » Sun Sep 01, 2013 22:14

I found the reason for my problem. In my build system one of the additional include directories was: "C:\InstallDir\cegui\include\cegui-0\CEGUI". However at some point during the compilation process a <cstring> header is implicitly called, that in turn looks for a "string.h" file.
The problem is that CEGUI also implements a "String.h" file (Windows doesn't care for case-sensitivity), so the <cstring> was using CEGUI's "String.h" file and this somehow caused the error message I've reported in my first post. So removing "CEGUI" from the include directory, i.e. "C:\InstallDir\cegui\include\cegui-0" solved the problem.

Here's a similar case on stackoverflow: error C2039: 'memchr' : is not a member of '`global namespace''

I remember having troubles configuring cmake for CEGUI. I wasn't able to define the install dir without the "cegui-0" subdir. Anyway, I hope this might help others.


Cheers
BrightBit
"Yeah so if you ever need info about anyone [...] Just ask. [...] They 'trust me'. Dumb fucks." - Mark Zuckerberg (Facebook CEO)


Return to “Help”

Who is online

Users browsing this forum: No registered users and 12 guests