Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / May 2006

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Praveen Chandra - 22 May 2006 11:06 GMT
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.
Bruno van Dooren - 22 May 2006 11:28 GMT
> I am trying to build a static library, while building the library i am
> getting the following error:
[quoted text clipped - 22 lines]
>
> #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.

Signature

Kind regards,
   Bruno van Dooren
   bruno_nos_pam_van_dooren@hotmail.com
   Remove only "_nos_pam"

Vladimir Nesterovsky - 22 May 2006 11:38 GMT
> 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. :-)
Signature

Vladimir Nesterovsky


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.