PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

using STL

I would like to use std::vector. Can I use "using namespace Frog" and "std" together? I try to wrote std::vector<int> test; and complier, but I got an error message: 'std' : is not a class or namespace name. 'vector' : undeclared identifier.... Can anyone help me please, thanks a lots.
I use a lot of STL in my !PyroManiA! game :)

Have you installed sgi's STLPort for eVC 3.0?
if yes, be aware about the differences between SGI's and Microsoft's STL implementations.

As for setup of STLPort check Conan's pages and if I remember correctly Thierry's there would be somemething about STLPort setup there.
As for eVC STL 4.0 haven't it used yet ;)

to use STL (in PocketFrog namespace):

Code:
#include <vector>
#include <algorithm>// To have the real STL power ;)

std::vector< std::vector<ui8> > 2DArray;
Thank you very much for your reply.
After I installed STLPort for eVC 3.0, I got some problems.
Here are my intatllation steps:
Down load STLPort-4.6.2 at http://www.stlport.org
Unzip and put it to "..\STLPort-4.6.2"
Add "..\STLPort-4.6.2\stlport" to the "include" list and up it to the top.
Set "#define _STLP_NEW_PLATFORM_SDK 1" on the "..\STLPort-4.6.2\stlport\stl_user_config.h" file
Then, #include <vector> #include <algorithm> on my file.

I got lots of error and warring message:
# error "Your compiler version is not recognized by STLport. Please edit <config/stl_mycomp.h>"
fatal error RC1015: cannot open include file '.../include/ctype.h'.
cannot open file '.\X86Dbg\StdAfx.sbr': No such file or directory

My complier enviroment is: eVC 3.0 + PocketFrog 0.8.1
Thanks for your help again.
Please be sure to check other posts on this forum about installing STL.
Probably(if I'm right) better to use previous version (I use STLPort 4.5.3)

Be sure to find info on this forum about:
Code:
#define __STL_NO_IOSTREAMS 1
#define _STLP_NO_NEW_IOSTREAMS 1


and probably other stl_user_config.h code modifications. In worse case I can post and stl_user_cofig.h here if you'll load 4.5.3 version

As for your question please check also Thierry's site:

droneship.com wrote:II - Installation
Note: as of release 0.8.0, STLport is NOT needed anymore.

While compiling resources for the Blit sample, I get the following errors:

RC4011: identifier truncated to '...'
#error : "Your compiler version is not recognized by STLport."

This error only occurs when you are targetting the PocketPC 2002 platform. For some reason I can't explain, the resource compiler is including a header file from STLport.

The workaround is simple: make your STLport include directory the last one in the list of include directories (menu Tools->Options..., "directories" tab).

See the Installation section for more details.


Anonymous wrote:
Add "..\STLPort-4.6.2\stlport" to the "include" list and up it to the top.

Not to the top, to the bottom.
That is why you get "Your version of compiler is not recognized..."
I downloaded 4.5.3 and put "..\STLPort-4.5.3\stlport" to the bottom. Then, it's work. :D
Sorry for my poor english, i should ask my english teacher about top and bottom first. :cry:
Thank you very much for your reply again.