Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Using minGW with STLport to compile wxWidgets anyone want the steps?
RJP Computing:
Thanks for sharing.
BjoernP:
Great, thanks!
I've been looking for exactly this some time ago, now this is a very good starting-point.
Just a few more questions:
- What was actually your motivation for using the stlport/wxSTL setup?
For myself, I was interested in this solution when I found some musings in the wiki of OGRE about the gcc-stl not working nicely... sharing data across shared libraries will easily corrupt the data, something like that.
See http://www.ogre3d.org/wiki/index.php/CodeBlocks_MingW_STLPort
That gave me a faint desperate hope tracking down some spooky bugs in my project (turned out to come from a different direction after all, as usual).
- What is different with these settings, what is working (better) now than with a plain gcc-stl and plain wx?
I still don't get the picture on what exactly is possible with the wx-Containers when having wxSTL set. A code sample would be helpful here. Can you then do things like create a wxArray from std::vector or even give a vector<>& where wxArray is expected?
That would be a neat thing indeed!
stahta01:
--- Quote from: BjoernP on February 08, 2007, 03:37:52 am ---Great, thanks!
I've been looking for exactly this some time ago, now this is a very good starting-point.
Just a few more questions:
- What was actually your motivation for using the stlport/wxSTL setup?
For myself, I was interested in this solution when I found some musings in the wiki of OGRE about the gcc-stl not working nicely... sharing data across shared libraries will easily corrupt the data, something like that.
See http://www.ogre3d.org/wiki/index.php/CodeBlocks_MingW_STLPort
That gave me a faint desperate hope tracking down some spooky bugs in my project (turned out to come from a different direction after all, as usual).
--- End quote ---
My motivation was reading about OGRE and Boost, I want to try to use Boost with MinGW and it requires STLport. Also, I wish to use STL with wxWidgets.
--- Quote from: BjoernP on February 08, 2007, 03:37:52 am ---- What is different with these settings, what is working (better) now than with a plain gcc-stl and plain wx?
I still don't get the picture on what exactly is possible with the wx-Containers when having wxSTL set. A code sample would be helpful here. Can you then do things like create a wxArray from std::vector or even give a vector<>& where wxArray is expected?
That would be a neat thing indeed!
--- End quote ---
So far, I have not found anything that works better. But, wxWidgets is the only thing I have used it for.
I did find that Code::Blocks needs a lot of code changes to use wxWidgets with STL.
Tim S
BjoernP:
Yea, same for me - here it's Boost with mingw too that gives me the jitters.
I don't get it running without optimizing less than -O2 (and -g) -- which makes debugging/stepping a somewhat funny procedure... you never know where the next step will take you.
But on the other hand it's fun for watching the compiler's optimizing at work - reordering,inlining, all that.
Without I get gcc-errors like "sorry, unimplemented: inlining failed in call to 'bla foo(whatever)'" with Boost::assign, Boost::date_time and the like. But these do also come up within STL headers but only when Boost is part of the game.
Another possible solution I had in mind was switching to a homebrew mingw gcc-4.1, not sure wether gcc-4-series would do better.
-- Now - do you guess stlport will give me better results on this?
-- And where did you hear it is required with mingw?
I will try the procedure the other day or after that and report where it took me.
For CB compilation I always used the standard wx setup, 2.6.3-2-unicode. For my own stuff i recently switched to wx-2.8/wx-head (is 2.9 now) from CVS.
But if CB needs a lot of adjustments, as you report, then other programs/libraries are not likely to run off-the-shelf with a wxSTL setup. I guess that's the problem with all setups/solutions that are slightly off the mainstream. Steeper roads to climb.
Bjoern
stahta01:
--- Quote from: BjoernP on February 08, 2007, 02:48:06 pm ---Yea, same for me - here it's Boost with mingw too that gives me the jitters.
I don't get it running without optimizing less than -O2 (and -g) -- which makes debugging/stepping a somewhat funny procedure... you never know where the next step will take you.
But on the other hand it's fun for watching the compiler's optimizing at work - reordering,inlining, all that.
Without I get gcc-errors like "sorry, unimplemented: inlining failed in call to 'bla foo(whatever)'" with Boost::assign, Boost::date_time and the like. But these do also come up within STL headers but only when Boost is part of the game.
Another possible solution I had in mind was switching to a homebrew mingw gcc-4.1, not sure wether gcc-4-series would do better.
-- Now - do you guess stlport will give me better results on this?
-- And where did you hear it is required with mingw?
--- End quote ---
The boost directions I found said it needed STLport for use with mingw.
--- Quote from: BjoernP on February 08, 2007, 02:48:06 pm ---I will try the procedure the other day or after that and report where it took me.
For CB compilation I always used the standard wx setup, 2.6.3-2-unicode. For my own stuff i recently switched to wx-2.8/wx-head (is 2.9 now) from CVS.
But if CB needs a lot of adjustments, as you report, then other programs/libraries are not likely to run off-the-shelf with a wxSTL setup. I guess that's the problem with all setups/solutions that are slightly off the mainstream. Steeper roads to climb.
Bjoern
--- End quote ---
Most of the C::B changes are needed because wx 2.4 style code was used and 2.4 code was not written to work with STL. So, if your project was written using the suggested wx 2.6 way it could work with STL OK.
wxList::Node* needs replaced with wxList::compatibility_iterator, note I am just guessing that wxList::Node* is the 2.4 way, I can find no documentation to confirm this. For that matter I can NOT even find wxList::compatibility_iterator in the 2.6 or 2.8 docs.
Found in changes.txt for 2.5.0
- Added wxList::compatibility_iterator. Can be used like wxNode* (except
it can't be delete()d). It permits writing code which will work
both with wxUSE_STL==1 and wxUSE_STL==0.
Tim S
Navigation
[0] Message Index
[*] Previous page
Go to full version