470,834 Members | 1,531 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,834 developers. It's quick & easy.

fatal error C1189: #error : "No sstream/strstream implementation"

Hi,
I am trying to build a static library, while building the library i am
getting the following error:

fatal error C1189: #error : "No sstream/strstream implementation"

Following is the code that is giving error:

#ifdef HAVE_CONFIG_H

# include <config.h>

#endif

#ifdef HAVE_SSTREAM

# include <sstream>

#elif HAVE_STRSTREAM

# define USE_STRSTREAM_WRAPPERS

#else

# error "No sstream/strstream implementation"

#endif

#if defined(USE_STRSTREAM_WRAPPERS) && !defined(SSTREAM_FIX_H)

#define SSTREAM_FIX_H

#include <string>

#include <strstream>

namespace std

{

/*

* Only limited functionality from ostringstream

* is implemented

*/

class ostringstream : public ostrstream {

public:

string str() {

char *cstr = ostrstream::str();

freeze(0);

if (cstr == 0) return string();

return string(cstr,pcount());

}

};

/*

* Only limited functionality from istringstream

* is implemented

*/

class istringstream : public istrstream {

public:

istringstream(const string& str)

: istrstream(str.c_str()) { }

};

}

#endif

If anyone has a solution for this please let me know.

Thanks,

Praveen.


May 22 '06 #1
2 2507
> I am trying to build a static library, while building the library i am
getting the following error:

fatal error C1189: #error : "No sstream/strstream implementation"

Following is the code that is giving error:

#ifdef HAVE_CONFIG_H

# include <config.h>

#endif

#ifdef HAVE_SSTREAM

# include <sstream>

#elif HAVE_STRSTREAM

# define USE_STRSTREAM_WRAPPERS

#else

# error "No sstream/strstream implementation"

#endif


did you define the appropriate macros? if so what did you define?
because the code clearly specifies that the error has to be generated if
none of the correct macros have been defined.
--

Kind regards,
Bruno van Dooren
br**********************@hotmail.com
Remove only "_nos_pam"
May 22 '06 #2
> I am trying to build a static library, while building the library i am
getting the following error:

fatal error C1189: #error : "No sstream/strstream implementation"

Following is the code that is giving error:


It's clear! Neither HAVE_SSTREAM nor HAVE_STRSTREAM is defined. :-)
--
Vladimir Nesterovsky
May 22 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

17 posts views Thread by Tobiah | last post: by
134 posts views Thread by James A. Donald | last post: by
1 post views Thread by Phil Sandler | last post: by
2 posts views Thread by Chris | last post: by
1 post views Thread by webtourist | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.