Problem with Sun Workshop C++ compiler

Problem with Sun Workshop C++ compiler

Post by Prakas » Sat, 18 Dec 1999 04:00:00



Hi All,
    I am using Sun Workshop 5.0.  for binary compatability I am using
compat=4 flag.   My code is compiled with features=rtti flag.  But I
have a library which is not compiled with this flag.  when I try to
link  Iget errors like.
        __rtacess__XYZ  unresolved symbol.

where XYZ is some class in the libraray not linked with rtti.  Is there
a way to overcome this problem.  Is it possible to mix libraries
compiled with and without features=rtti flag.

Thnaks in advance.

regards,
Prakash.

 
 
 

Problem with Sun Workshop C++ compiler

Post by Adam Lupu-Sa » Sat, 18 Dec 1999 04:00:00


I am in the same situation.  If you use features=rtti in one lib than
you need it on all the libs which provide the virtual tables for
polymorphic objects you use in the library in question.  So, if you
use a polymorphic object from another lib, you have to compile that
lib with features=rtti also.  However, libs which don't provide
objects you use can be compiled without the flag.

I had this problem with the Roguewave libs and so I removed the few
uses I had left (I switched to STLport).  Of course I could have
recompiled roguewave with features=rtti...

BTW, have you found the 5.0 compiler to be exceedingly slow compared
to 4.2?  

Adam

--
____________________________________________________________

http://monsoon.harvard.edu/~lupu-sax
PGP public key: http://monsoon.harvard.edu/~lupu-sax/key.asc

 
 
 

Problem with Sun Workshop C++ compiler

Post by Ian Collin » Sat, 18 Dec 1999 04:00:00



> Hi All,
>     I am using Sun Workshop 5.0.  for binary compatability I am using
> compat=4 flag.   My code is compiled with features=rtti flag.  But I
> have a library which is not compiled with this flag.  when I try to
> link  Iget errors like.
>         __rtacess__XYZ  unresolved symbol.

> where XYZ is some class in the libraray not linked with rtti.  Is there
> a way to overcome this problem.  Is it possible to mix libraries
> compiled with and without features=rtti flag.

I don't think there is.

    Ian

 
 
 

Problem with Sun Workshop C++ compiler

Post by Ian Collin » Sat, 18 Dec 1999 04:00:00



> I am in the same situation.  If you use features=rtti in one lib than
> you need it on all the libs which provide the virtual tables for
> polymorphic objects you use in the library in question.  So, if you
> use a polymorphic object from another lib, you have to compile that
> lib with features=rtti also.  However, libs which don't provide
> objects you use can be compiled without the flag.

> I had this problem with the Roguewave libs and so I removed the few
> uses I had left (I switched to STLport).  Of course I could have
> recompiled roguewave with features=rtti...

> BTW, have you found the 5.0 compiler to be exceedingly slow compared
> to 4.2?

> Adam

It is slower in compat=5 mode, because it has a lot more to do, with
compat=4
it looks about the same.

    Ian

 
 
 

1. Sun Workshop 5 C++ compiler problem on Solaris 8

Dear All,

I'm planning do some c++ coding on the the UltraSparc system in our group.
We had Sun Workshop 5 and Solaris 8 installed, and to test the c++
compiler, I wrote the very basic hello.cpp shown below
*******************************************************
#include <iostream.h>

int main(int argc, char **argv)
{
        cout << "hello world"<<endl;
  return 0;
*******************************************************
but I faced a really wired phenomena as below:
*******************************************************
~> CC hello.cpp
"/usr/include/iso/wchar_iso.h", line 100: Error: Multiple declaration for
mbstate_t.
"/opt/SUNWspro/SC5.0/include/CC/./iosfwd", line 51: Error: The name
mbstate_t is ambiguous, std::mbstate_t and std::mbstate_t.
"/opt/SUNWspro/SC5.0/include/CC/./iosfwd", line 78: Error: The name
mbstate_t is ambiguous, std::mbstate_t and std::mbstate_t.
"/opt/SUNWspro/SC5.0/include/CC/rw/iotraits", line 56: Error: The name
mbstate_t is ambiguous, std::mbstate_t and std::mbstate_t.
4 Error(s) detected.
*******************************************************
I can't figure out what the problem, and we have been using fortran
and C successfully before.  Is there anyone faced this problem before?
I'm really frustrated by it, any suggestions or comments will greatly
appreciated.

Thanks,

-Chi

2. Question about device drivers and errno

3. Are sun studio C/C++ compilers and Forte C/C++ compilers same ??

4. Samba : cannot access Samba server via NT Domain.

5. undefined symbol ::__vtbl with Sun WorkShop 6 update 1 C++ Compiler (5.2)

6. Header Files

7. SUN Workshop C++ Compiler Error

8. Network Analysis Tool

9. Sun Workshop 4.2 C++ Compiler - debug symbol format not understood by debuggers

10. SUN Workshop C++ Compiler Error

11. Looking for Sun WorkShop C++ Compiler 5.0

12. SUN Workshop C++ Compiler 5.0 dead slow

13. Linking errors on SunOS 5.8 Sun WorkShop 6 update 1 Compilers C++