GCC 3.4.2 and win32gui

Help
2005-04-10
2013-04-15
  • This should be clearly stated in docs. Not 3.3+ but 3.3.x for <=1.6.1(?) and 3.3+ for 1.6.4devel for sure.

    Yep, I spend some time trying to build 1.4.1 and 1.6.1 with gcc 3.4.2/MinGW and trying to figure it out WHY it's not working...
    OK, let's look at example:
    [ all the code in (old?) win32gui is written that way :-/ ]
    file: 'a.cpp'
    from 1.6.1 :)
    //--------- code start ---------
    class window_base;
    template<class impl = window_base > class wnd
    {
    private:
        static bool same_hwnd(const window_base * p, const window_base * p_other) {
            if ( (p == 0) || (p_other == 0) )
                return (p == 0) && (p_other == 0);
            return p->raw_hwnd() == p_other->raw_hwnd();
        }
    };
    int main()
    {
    }
    //--------- code end ---------

    And output from compilers:
    >g++ --version
    g++ (GCC) 3.2 (mingw special 20020817-1)
    >g++ a.cpp
    a.cpp:3: warning: all member functions in class `wnd<impl>' are private

    >g++ --version
    g++ (GCC) 3.3.1 (mingw special 20030804-1)
    >g++ a.cpp
    a.cpp:3: warning: all member functions in class `wnd<impl>' are private

    >g++ --version
    g++ (GCC) 3.4.2 (mingw-special)
    >g++ a.cpp
    a.cpp: In static member function `static bool wnd<impl>::same_hwnd(const window_
    base*, const window_base*)':
    a.cpp:8: error: invalid use of undefined type `const struct window_base'
    a.cpp:1: error: forward declaration of `const struct window_base'
    a.cpp:8: error: invalid use of undefined type `const struct window_base'
    a.cpp:1: error: forward declaration of `const struct window_base'

    Oh yeah baby! That's the errored code in more standarded C++! :D
    3.2/3.3 gives ONLY ONE warning...

    sweet project but not for my 3.4.2 ;-P
    Am I missed something? :)

    And 1.6.4 devel? Well...
    [...]
    ../../../win32gui/detail/general/is_using_auto_mapping.hpp:82: warning: cannot p
    ass objects of non-POD type `struct win32::gui::construct_auto_mapping_wnd' thro
    ugh `...'; call will abort at runtime
    [...]
    and so on...
    Is that kind of errors are dangerous for applications using win32gui lib????

    And even:
    [...]
    ../../../win32gui/detail/event_handling/event_handler_impl.hpp:373: warning: int
    eger overflow in expression
    [...]

    But the lib IS created somehow :)
    The compiler/gcc/hello_world.cpp should be updated. There is not no_parent() in wnd<> (??)

    The quickstart example compiled OK, but should it client area turns white after New View command? Is this a good behavior of this example?