help-gplusplus
[Top][All Lists]
Advanced

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

Re: C library support in g++ 3.4.2 on SUN Solaris 5.8


From: Paul Pluzhnikov
Subject: Re: C library support in g++ 3.4.2 on SUN Solaris 5.8
Date: Mon, 11 Jul 2005 20:03:52 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux)

"Vinu" <vinuwarrier@yahoo.com> writes:

> We are currently using g++ 3.4.2 on SUN Solaris 5.8 . Whenever we make
> a call to any wide string functions like wcsncpy(), wcscmp() etc., we
> are getting Segmentation Fault - Core Dump.

Post a complete minimal example.

> These functions are accessed from '/usr/lib/stdc.so.1'

That's very unlikely: no such library exists on any of my Solaris
systems. The library that wcscmp() *should* be coming from is /lib/libc.so.1

> How can we verify the support for the wide character string
> related C functions while using g++ 3.4.2 to avoid core dump?

The following program runs fine on Solaris 7 compiled with gcc-3.4.0
and on Solaris 10 compiled with gcc-3.4.4. What does it do on your system?

$ cat wcscmp.c
#include <wchar.h>

int main()
{
    wchar_t *a = L"abc";
    wchar_t *b = L"abc";

    return wcscmp(a, b);
}

$ /usr/local/gcc-3.4.4/bin/g++ -g wcscmp.c && ./a.out && echo ok
ok

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]