PocketMatrix forums

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

STL 4 or 4.5.3

Can anyone send me a (.zip a modified one that is) version of the STL that they use to compile PocketFrog 0.7. I can't get mine to work. This is crucial to my project, I need to fix the leaks in PocketFrog.

Thanx a lot in advance,

Regards,
Kornalius
You should use STLport as described here: http://pocketfrog.droneship.com/FAQ.html

What leaks are you talking about? If there are any, they are certainly not related to STL.
No, Thierry, sorry I don't want to confuse people into thinking that PocketFrog has major leaks.

I am talking about the fact that two variables are not freed and intitialized to NULL , therefore you can't re-init the engine during the same session. You told me how to fix it but I cannot get STL (4 or 4.5.3) to compile properly. I am using PocketFrog 0.7 and eVc++ 3 and 4.

I also tried everything from the FAQ but Display::Close() doesn't exists.

I am getting an 'end of file' error, which is described in my other thread about this problem.

Regards,
Kornalius
To make PocketFrog 0.7 and STLport 4.5.3 compile i had to download PF 0.6 and copy stl_user_config.h from there to STLport. Now it works perfectly on eVC 3.0
I'll try this out then! I am very desperate with this problem.

Would there be somebody kind enough to send me a compiled STL port (library) as a zip file?

Regards,
Kornalius
Kornalius, you do NOT want to compile STLport. You have to disabled the C++ I/O streams and then it should work as-is. No compilation involved.
First of all: Kornelius, if you keep asking stupid questions you will get stupid answers.

And secondly: why is "STL not working" still a reocurring post on this forum?? I've been away for quite some time now and yet when I return there are still STL issues.

Obviously the main site lacks the info needed for not so talented users to use it on their PDA (together with say PocketFrog). I remember myself having some problems at first but got it working after looking in this forum (as it turned out I used the wrong version of STLport).

Framzetti once hosted a site dedicated for PF which had a tutorial for getting STL working with PF (which, if nothing major has happened since I was last around in about a year ago, is just to change the stl_user_config.h to NOT USE IOSTREAMS. A correct version of stl_user_config.h is included in the PF package but for some reason this is frequently overlooked by new users who jump right onto compiling everything (and as Thierry said, STLport should NOT be compiled))

And for those who think I'm full of shit and that this post is not relevant, take a look at these posts: http://www.pocketmatrix.com/forums/view ... hlight=stl
http://www.pocketmatrix.com/forums/view ... hp?t=16073

Pretty much says it all I think. Personally I would like to see the following things:
1. Newbies show some respect and actually look if their questions has already been answered in the forum BEFORE posting a new topic/note.
2. People should STOP REPLYING to threads that has already been answered to since this will only further confuse the newbie (and it will give the impression that the old notes are outdated AND that it will be faster to post a new note than read through the old ones). A simple "this has already been answered in a previous note" will do. For the really helpful users, you may supply a link to that note.
3. Put up some decent documentation for PF (like FZammetti once had the noble ambition to do) on a website. Collecting the important stuff we can extrapolate from this forum. Otherwise there will be STL issues floating around, getting reposted, at this forum even next year and the year after that and the year .... same goes for other common questions.

There's an interesting concept called a WIKI which comes to mind (Wiki is a webpage where the users edit the content themselves and the old/outdated/unrelated stuff gets weeded out and replaced by up-to-date information. And you have version checking and diffs so you know exactly what has been added/removed.). I still think this forum has a purpose at PocketFrog but some of the things in it should definately be restructured and/or moved so that is makes sense (and so it will not produce as much redundant work)

Just a few thoughts..

B.t.w. sorry for not posting this as a new topic. Feel free to move this post (and possibly remove my sly remark to Kornelius)
In this note FZammetti is doing as I suggested earlier: http://www.pocketmatrix.com/forums/view ... hp?t=16749

i.e. just answer the newbie with a link.

But the question still stands: why is the topic still in the forum?? It has no use and provides no (new) answers: hence, it should be removed!

There's a reason for newcomers not reading 8 pages of old posts and that is simply because there are to many OLD posts. Unrelated old stuff should be weeded out by someone (and/or the still usefull stuff for new users should, as I said earlier, be collected into a new forum/webpage/wiki).
Stupid questions? :roll: ... Maybe.

This place is here to answer our questions no? I use PocketFrog and I want support just like everybody here.
adde wrote:
A simple "this has already been answered in a previous note" will do.


???
"This place is here to answer our questions no? I use PocketFrog and I want support just like everybody here."
Exactly my point. But posting new topics for something that has already been dealt with previously is just redundant.

And yes fast_rx, I do realize the irony of not simply refeering to some old post myself (although I did that to). But I feel like someone should take the initiative to this debate. Or, it could be just me and that nobody really cares about all the newbies not reading through the old notes because there are far to many BS notes still laying around (like this one in a few weeks). This will benefit everyone (inkluding newbies).
Adde, see this thread http://www.pocketmatrix.com/forums/view ... hp?t=16722 , the last two posts from me. Maybe you can use some of your knowledge to try to help a NEWBIE.

Edit: Fixed the coma at the end of the link!

Regards,
Kornalius
First out, the link Kornelius posted does not work since it has a trailing "," char at the end.. Simply remove it and you will get to topic 16722.

I've already read that post (before answering this one) and to quote Thierry from that thread:
"If I remember correctly, you have two things to do:
1) Call PocketPC::Shutdown() or something similar. Look up how the framework shuts down.
2) Modify PocketPC. There is a problem with pointers not being reset to 0 for the display and input drivers.
Someone already discussed this a few months ago and got it working.
BTW, posting tons of replies won't get you help any faster."


and then his second post:
"Oh sorry you are right, there is no PocketPC::Shutdown. I guess you will need to add it.
The problem is with the two following variables (in PocketPC.cpp):
DisplayDriver* l_displayDriver; //fixme: leak at exit
InputDriver* l_inputDriver; //fixme: leak at exit

See the comments? =) You will have to create a Shutdown() function in PPC that destroy these two objects and set them back to NULL.
In Game::Shutdown() after the two pointer resets(), you want to call PocketPC::Shutdown(). This should do it. After that you can reinitialize everything."


The reason for not posting an answer is that you already have all the information you need (provided you are prepared to get your hands dirty and look into the actual source file of pocketpc.cpp and realize that the reason you can't start up a window twice is because the global (well, actually local to the file) pointers l_displayDriver and l_inputDriver are never reset to NULL at shutdown (or even worse, the object that it is pointing to is never deleted although all the memory that it once allocated for its members is).

There.. I just said the exact same thing as Thierry did in the other thread.

But since I am a really nice guy I'll even throw in a bonus and that is my modified version of the pocketpc.h/.cpp files where I have added a static function that I chose to name "InvalidateDrivers()". Make sure you call this function in your Game::Shutdown() func after m_display.reset()

I even call it before doing PocketPC::CreateDisplay() in the Game::Init(). This has to do with the fact that the pointers are never properly initialized either. Thierry is heavily relying on the fact that: "The C standard dictates that any static values that aren't explicitly initialized in the code must be initialized to zero, but nonstatic values are undefined." Also, I needed to be able to call CreateDisplay multiple times. This is probably not supported on the PocketPC platform using GAPI but it is on a WCE platform or desktop using the W32 drivers.

I did this modification since I needed to be able to launch multiple windows using PF and ATL (I had a 800x600 resolution on my PDA). To be able to handle this I also needed to add threads and add some of the stuff that FZammetti later did for PF 0.7.0 to be able to use Heckus together with PF.

To be honest, these modifications is only a quick hack. What you would like is to do a proper delete on these pointers at shutdown and not call the function during init. Hence, rename InvalidateDrivers to Shutdown and then change:
l_displayDriver=0; and l_inputDriver=0;
to
delete l_displayDriver; and delete l_inputDriver;

You can find my modified files at http://www.nada.kth.se/~t98_hes/pf/ together with some other stuff you may or may not find useful (probably not hugh).

A big appology for once again writing about something that has been dealt with before on this forum.. This seems to be a pattern that is extremely hard to break. I will post a new topic during the weekend containing information about a free WIKI where people can maintain an FAQ and knowledge database (it's sort of like this forum but with a higher ability to cross reference and link between topics and later remove old/outdated/false/non interesting information.)
Thanx adde for your help, but I wasn't having problems making the changes to PocketFrog, it is the STLPort that doesn't want to compile properly when compiling the PocketFrog library. My changes were done already.

You've repeated comments that weren't necessary! :wink:

Regards,
Kornalius
You've repeated comments that weren't necessary!

Ok.. sorry about that.. For the STL issues I can only suggest that you use the search function of this forum for STL problem as they are all described and solved. Two hints though:
1. You're not suppose to compile STL lib. It can't be done on a PocketPC.
2. You basicly just need a stl_user_config.h file with the right settings in order to get it to work.. All this is explained in the FAQ and on other posts. And the config file is even included in PF (atleast in 0.6.0). The stuff you need to change is with the iostreams since they are not implemented on the PPC.

Also.. I seem to recall having problem myself in the beginning because I used a newer version of STLport.. You just grab the one that is working (and that is again posted here and there and in the FAQ).

This will be my final post on this thread. I've written to much already.
Thanx adde but I have done all of this and I cannot get past this error. I will try again this weekend.