Page 1 of 1

STLPort, Visual Studio 6, and streams

Posted: Fri Oct 28, 2005 3:05 pm
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?

Posted: Sat Oct 29, 2005 5:11 am
by Nirvana
Did you search to see what defining that would do????
Maybe defining that undefines several other things.

Posted: Sat Oct 29, 2005 9:42 am
by Iceman
Yeah, I have tried all sorts of sh1t like that ... no luck yet.

Posted: Sat Oct 29, 2005 3:55 pm
by Nirvana
Well it obviously undefines (or redefines) something :P

Are you using an IDE, and if so what?

Posted: Sat Oct 29, 2005 11:55 pm
by Iceman
Yes, Visual Studio 6

Posted: Sun Oct 30, 2005 3:04 pm
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.

Posted: Mon Oct 31, 2005 8:32 am
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).

Posted: Mon Oct 31, 2005 10:42 am
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 ...

Posted: Mon Oct 31, 2005 4:51 pm
by DCrazy
Ah, the joys of preprocessor macros. :roll:

Thank God for C#. :D

Posted: Mon Oct 31, 2005 7:36 pm
by Sirius
Except C# is sort of semi-interpreted vaguely like Java, isn't it?

So near, yet so far... :]

Posted: Mon Oct 31, 2005 8:27 pm
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.

Posted: Wed Nov 02, 2005 1:43 am
by Nirvana
I believe the next windows OS was supposed to be, but MS decided the language was still too young.

I <3 C++.