Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

error in win32gui with gcc-3.4.2??

Help
Brian
2005-08-05
2013-04-15
  • Brian
    Brian
    2005-08-05

    from win32gui/detail/general/defs.hpp

       #if __GNUC__ > 3 || __GNUC_MINOR__ >= 4
        // gcc 3.4+
        #define WIN32GUI_TYPEDEF_TYPENAME typename
        #else   
        // gcc 3.3
        #define WIN32GUI_TYPEDEF_TYPENAME
        #endif

    in my version, Dev-Cpp gcc-3.4.2 I get an error when any of the templates try and use WIN32GUI_TYPEDEF_TYPENAME

    ie, events/detail/base.hpp:129: error: expected nested-name-specifier before "arg_type"

    template<class event_base, class arg_type = event_detail::no_arg > struct event_ex_param : public event_base {
        typedef WIN32GUI_TYPEDEF_TYPENAME arg_type arg;
        using WIN32GUI_TYPEDEF_TYPENAME event_base::signature;
        using event_base::control_id;
        using event_base::event_id;
    };

    I've tried to run a simple test program and I get the same error, it does appear that 3.4.2 does not support this either:

    #define MY_TYPEDEF_TYPENAME typename
    template<typename arg_type>
    void func(arg_type t)
    {
         typedef MY_TYPEDEF_TYPENAME arg_type arg;
         arg a;
         a=t;
         cout << t << endl;
    }

    int main(int argc, char* argv[])
    {
        func<int>(4);
        system("PAUSE");
        return EXIT_SUCCESS;
    }

     
    • John Torjo
      John Torjo
      2005-08-06

      typename is really broken in GCC, in general

      What version of win32gui are you trying to compile?

      Best,
      John

       
    • Brian
      Brian
      2005-08-09

      1.6.6