Author Topic: wx2.6.1 w/o STL works fine, w/ STL does not  (Read 4507 times)

jver

  • Guest
wx2.6.1 w/o STL works fine, w/ STL does not
« on: September 17, 2005, 12:23:39 am »
I downloaded the CVS snapshot of Codeblocks in the conventional way and tested two different wx 2.6.1 libraries
monolithic,static,unicode and monolithic,static,unicode,stl. The first one compiles/links Code::Blocks fine, the latter shows the following errors.

Code: [Select]
In file included from Managers/StdAfx.h:18,
                 from Managers/Managers.cpp:4:
editormanager.h:162: error: `Node' is not a member of type `EditorsList'
editormanager.h:162: error: `node' was not declared in this scope
editormanager.h:162: error: variable declaration is not allowed here
In file included from Managers/StdAfx.h:21,
                 from Managers/Managers.cpp:4:
toolsmanager.h:52: error: `Node' is not a member of type `ToolsList'
toolsmanager.h:52: error: `node' was not declared in this scope
toolsmanager.h:52: error: invalid data member initialization
toolsmanager.h:52: error: (use `=' to initialize static data members)
toolsmanager.h:52: error: variable or field `DoRemoveTool' declared void

Is Code::Blocks not fully wx/STL compatible?

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1442
    • CenizaSOFT
Re: wx2.6.1 w/o STL works fine, w/ STL does not
« Reply #1 on: September 17, 2005, 01:58:16 am »
wxWidgets with STL has several differences that makes Code::Blocks code break. I had the same problem the first time I tried to compile Code::Blocks 'cause my wxWidgets build used STL. Trying to solve the problem I found it'd require a lot of changes, mainly in wxWidgets so I just switched to wxWidgets with built-in containers (without STL).

Answering your question: Your're right, Code::Blocks is not fully wxWidgets-build-with-STL compatible because of the differences found in both implementations in wxWidgets code.

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: wx2.6.1 w/o STL works fine, w/ STL does not
« Reply #2 on: September 17, 2005, 04:32:31 am »
Oh great, first was unicode, and now this? What's next, support for Klingon user interfaces? :P

Let's hope linux distros don't come with wxWidgets-STL precompiled.

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: wx2.6.1 w/o STL works fine, w/ STL does not
« Reply #3 on: September 17, 2005, 09:35:40 am »
Sorry to say, but wx 3 will derive almost all from STL....
The strings, the vectors, almost all will use the STL.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: wx2.6.1 w/o STL works fine, w/ STL does not
« Reply #4 on: September 17, 2005, 12:02:10 pm »
Sorry to say, but wx 3 will derive almost all from STL....
The strings, the vectors, almost all will use the STL.

That would be excellent. Or did you think that we 're using the wx containers because we think they 're better than their STL coutnerparts ? ;)
No, when I started the project, I decided to follow the wx portability guidelines. No STL, no templates etc, although I don't really agree with it anymore...
Be patient!
This bug will be fixed soon...

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: wx2.6.1 w/o STL works fine, w/ STL does not
« Reply #5 on: September 17, 2005, 07:34:28 pm »
If only that could be true! This sounds almost too good.
If wxWidgets started using the STL instead of deliberately breaking it, that would for once really be a "Smart" idea.

std::vector =

wxObjectArray =
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: wx2.6.1 w/o STL works fine, w/ STL does not
« Reply #6 on: September 17, 2005, 10:25:10 pm »
More specifically:

Quote
>Hi! Just a little question about wxWidgets 3.0
>
>It will have full STL compatibiliy in the sense we'll be using for
>example std::vector instead of wxObjectArray?

3.0 is not specified at present, it'll take a lot of discussion.
But it seems probable that this will be the case.

Regards,

Julian