Problem pushing glib.h through Sun C++ compiler, Solaris 7,8, CC 5.0/6.1



this problem shows up while compiling wxGTK (wxWindows using GTK).

Version: glib-1.2.8, gtk+-1.2.8, wxGTK-2.2.5 (really any 2.2.x version)
OS: Solaris 7, Solaris 8
Compilers: Sun CC 5.0, Sun CC 6.1

Compiling glib works just fine (I believe C compiler is used for that). 
The problem arises when I am compiling wxGTK (which uses C++ compiler),
which includes glib.h. 
 
Both Sun CC 5.0 and Sun CC 6.1 choke on line 2079 in glib.h and it's not
quite obvious to me why.  

I get an error:
 "/sopt/SUNWspro50/SUNWspro/SC5.0/include/CC/std/time.h", line 29:
Error: Multiple declaration for std::tm.  

To correct the problem:

Change line 2079 in file "glib.h", 
         from
      2079 struct tm;
         to
      2079 #include <time.h>

After the fix, I can rebuild glib, gtk and wxGTK just fine.

Sun's CC 5.0 has not been known for being the best compiler under the
Sun, but the same happens with 6.1 and is a bit annoying.

Again, I am not sure why, just wanted to let people know.  Anybody?

BTW, thank you people for an excellent system.

-- 
Jiri Mracek 
Agere Systems 
(formerly Lucent Technologies Microelectronics)




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]