STLPort, Visual Studio 6, and streams

For all coding issues - MODers and programmers, HTML and more.

Moderators: Jeff250, fliptw

Post Reply
User avatar
Iceman
DBB Habitual Type Killer
DBB Habitual Type Killer
Posts: 4929
Joined: Thu Apr 20, 2000 2:01 am
Location: Huntsville, AL. USA
Contact:

STLPort, Visual Studio 6, and streams

Post by Iceman »

I cannot figure out why this is happening ... I installed STLPort, uncommented the "# define _STLP_NO_OWN_IOSTREAMS 1" in stl_user_config.h, and no matter what file I include the symbol std::basic_ostream<T> cannot be found. Any ideas what I am doing wrong?
User avatar
Nirvana
DBB Harasser
DBB Harasser
Posts: 1123
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Nirvana »

Did you search to see what defining that would do????
Maybe defining that undefines several other things.
User avatar
Iceman
DBB Habitual Type Killer
DBB Habitual Type Killer
Posts: 4929
Joined: Thu Apr 20, 2000 2:01 am
Location: Huntsville, AL. USA
Contact:

Post by Iceman »

Yeah, I have tried all sorts of sh1t like that ... no luck yet.
User avatar
Nirvana
DBB Harasser
DBB Harasser
Posts: 1123
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Nirvana »

Well it obviously undefines (or redefines) something :P

Are you using an IDE, and if so what?
User avatar
Iceman
DBB Habitual Type Killer
DBB Habitual Type Killer
Posts: 4929
Joined: Thu Apr 20, 2000 2:01 am
Location: Huntsville, AL. USA
Contact:

Post by Iceman »

Yes, Visual Studio 6
User avatar
Nirvana
DBB Harasser
DBB Harasser
Posts: 1123
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Nirvana »

Yeah, shoulda re-read the topic... I don't know if 6 has this feature, but right click on the call that's coming up undefined now and do "show definition" or something to see what defines are around it.
User avatar
DCrazy
DBB Alumni
DBB Alumni
Posts: 8826
Joined: Wed Mar 15, 2000 3:01 am
Location: Seattle

Post by DCrazy »

Remove all reference's to VC++'s STL from your directory options, it looks like VC++'s std:: namespace is conflicting with STLPort's std:: namespace (which is really called stlport::, but is redefined by macros).
User avatar
Iceman
DBB Habitual Type Killer
DBB Habitual Type Killer
Posts: 4929
Joined: Thu Apr 20, 2000 2:01 am
Location: Huntsville, AL. USA
Contact:

Post by Iceman »

DCrazy wrote:Remove all reference's to VC++'s STL from your directory options, it looks like VC++'s std:: namespace is conflicting with STLPort's std:: namespace (which is really called stlport::, but is redefined by macros).
That problem is solved by putting the STLPort search path first in Tools->Options->Directories->Include Files.

I think I found a solution though ... testing it now. All documentation I have seen says to define the tag _STLP_NO_OWN_IOSTREAMS in stlport/stl_user_config.h in order to use the local streams as opposed to the SGI streams. That clearly doesn't work. I was examining stlport/stl/_site_config.h and found an ifdef that defines _STLP_NO_OWN_IOSTREAMS if _STLP_NO_IOSTREAMS is defined. So, from the project settings I defined _STLP_NO_IOSTREAMS and VOILA! Success so far ...
User avatar
DCrazy
DBB Alumni
DBB Alumni
Posts: 8826
Joined: Wed Mar 15, 2000 3:01 am
Location: Seattle

Post by DCrazy »

Ah, the joys of preprocessor macros. :roll:

Thank God for C#. :D
User avatar
Sirius
DBB Master
DBB Master
Posts: 5616
Joined: Fri May 28, 1999 2:01 am
Location: Bellevue, WA
Contact:

Post by Sirius »

Except C# is sort of semi-interpreted vaguely like Java, isn't it?

So near, yet so far... :]
User avatar
DCrazy
DBB Alumni
DBB Alumni
Posts: 8826
Joined: Wed Mar 15, 2000 3:01 am
Location: Seattle

Post by DCrazy »

Not to the extent of Java. The CLR is not a complete VM like the JVM is. Close, but not entirely the same.

I say it's a matter of time before someone writes an operating system which implements .NET natively.
User avatar
Nirvana
DBB Harasser
DBB Harasser
Posts: 1123
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Nirvana »

I believe the next windows OS was supposed to be, but MS decided the language was still too young.

I <3 C++.
Post Reply