public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* gcc 3.2 string<wchar_t> link problem
@ 2002-11-17 16:05 Nigel Stewart & Fiona Smith
  2002-11-18  6:49 ` Xavier Pianet
  0 siblings, 1 reply; 7+ messages in thread
From: Nigel Stewart & Fiona Smith @ 2002-11-17 16:05 UTC (permalink / raw)
  To: cygwin

Hello all,

Having happily upgraded my Cygwin to include gcc 3.2, I've
encountered a show-stopper: The linker can't resolve symbols
involving wide C++ strings.  Here is an example:

#include <string>
#include <iostream>
using namespace std;

int main(int argc,char *argv[])
{
        std::string<wchar_t> test;
}

-----------------

$ g++ test.cpp
/cygdrive/c/DOCUME~1/nigels/LOCALS~1/Temp/ccHP4AMl.o(.text+0x25):test.cpp: 
undefined reference to `std::basic_string<wch
ar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> 
 >::basic_string[in-charge]()'
/cygdrive/c/DOCUME~1/nigels/LOCALS~1/Temp/ccHP4AMl.o(.text+0x30):test.cpp: 
undefined reference to `std::basic_string<wch
ar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> 
 >::~basic_string [in-charge]()'
collect2: ld returned 1 exit status

---------------------------

Any hints, suggestions, or duh-read-the FAQ responses, appreciated.

Note that the following compiles & links:

int main(int argc,char *argv[])
{
        std::string<double> test;
}

----------------

$ gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.2/specs
Configured with: /netrel/src/gcc-3.2-3/configure 
--enable-languages=c,c++,f77,java --enable-libgcj --enable-threads=posi
x --with-system-zlib --enable-nls --without-included-gettext 
--enable-interpreter --disable-sjlj-exceptions --disable-ve
rsion-specific-runtime-libs --enable-shared --build=i686-pc-linux 
--host=i686-pc-cygwin --target=i686-pc-cygwin --enable
-haifa --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc 
--libdir=/usr/lib --includedir=/nonexistent/include --libexecd
ir=/usr/sbin
Thread model: posix
gcc version 3.2 20020927 (prerelease)

Cheers,

Nigel Stewart



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gcc 3.2 string<wchar_t> link problem
  2002-11-17 16:05 gcc 3.2 string<wchar_t> link problem Nigel Stewart & Fiona Smith
@ 2002-11-18  6:49 ` Xavier Pianet
  2003-02-05 14:22   ` Nigel Stewart & Fiona Smith
  0 siblings, 1 reply; 7+ messages in thread
From: Xavier Pianet @ 2002-11-18  6:49 UTC (permalink / raw)
  To: cygwin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2828 bytes --]

Hi there,

See my post few weeks ago (29/10/2002)
subject : conflicting types for `typedef struct mbstate_t`(was link troubles
with wcslen)

also the one from zhang le on 27/10/2002
  missing wcsncmp,wcscpy,wcsncpy and more...

or a search in the archives on wcslen

no one on the list acknowledged the pb (cfg ?) and i noticed that gcc-3.2-2
probably solved issue 2) of my post because it had the following comment
(msg [ANNOUNCEMENT] Updated: gcc-3.2-2 10/11/2002):
'However, the only noticeable change from the last release was an attempt to
correctly define mbstate_t.'

I'm positive that wcslen is in newlib but i'm not sure for
wcsncmp,wcscpy,wcsncpy as i didn't needed them a that time.

Xavier

"Nigel Stewart & Fiona Smith" <nigels@nigels.com> a écrit dans le message
news: 3DD82975.1040600@nigels.com...
> Hello all,
>
> Having happily upgraded my Cygwin to include gcc 3.2, I've
> encountered a show-stopper: The linker can't resolve symbols
> involving wide C++ strings.  Here is an example:
>
> #include <string>
> #include <iostream>
> using namespace std;
>
> int main(int argc,char *argv[])
> {
>         std::string<wchar_t> test;
> }
>
> -----------------
>
> $ g++ test.cpp
> /cygdrive/c/DOCUME~1/nigels/LOCALS~1/Temp/ccHP4AMl.o(.text+0x25):test.cpp:
> undefined reference to `std::basic_string<wch
> ar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>
>  >::basic_string[in-charge]()'
> /cygdrive/c/DOCUME~1/nigels/LOCALS~1/Temp/ccHP4AMl.o(.text+0x30):test.cpp:
> undefined reference to `std::basic_string<wch
> ar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>
>  >::~basic_string [in-charge]()'
> collect2: ld returned 1 exit status
>
> ---------------------------
>
> Any hints, suggestions, or duh-read-the FAQ responses, appreciated.
>
> Note that the following compiles & links:
>
> int main(int argc,char *argv[])
> {
>         std::string<double> test;
> }
>
> ----------------
>
> $ gcc -v
> Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.2/specs
> Configured with: /netrel/src/gcc-3.2-3/configure
> --enable-languages=c,c++,f77,java --enable-libgcj --enable-threads=posi
> x --with-system-zlib --enable-nls --without-included-gettext
> --enable-interpreter --disable-sjlj-exceptions --disable-ve
> rsion-specific-runtime-libs --enable-shared --build=i686-pc-linux
> --host=i686-pc-cygwin --target=i686-pc-cygwin --enable
> -haifa --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc
> --libdir=/usr/lib --includedir=/nonexistent/include --libexecd
> ir=/usr/sbin
> Thread model: posix
> gcc version 3.2 20020927 (prerelease)
>
> Cheers,
>
> Nigel Stewart
>
>
>





--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gcc 3.2 string<wchar_t> link problem
  2002-11-18  6:49 ` Xavier Pianet
@ 2003-02-05 14:22   ` Nigel Stewart & Fiona Smith
  2003-02-05 14:26     ` Christopher Faylor
  0 siblings, 1 reply; 7+ messages in thread
From: Nigel Stewart & Fiona Smith @ 2003-02-05 14:22 UTC (permalink / raw)
  Cc: cygwin

As a follow-up to this still-unresolved issue,
some traffic on the MingW list reveals the same
issue using MingW, which I have also (unsuccessfully)
been experimenting with:

http://www.geocrawler.com/mail/msg.php3?msg_id=9057201&list=6013
http://lists.boost.org/MailArchives/boost/msg41422.php

http://sourceforge.net/mailarchive/message.php?msg_id=1991233

Which has been added to their bug tracker database:
https://sourceforge.net/tracker/index.php?func=detail&aid=664369&group_id=2435&atid=102435

Has anyone else had progress with wchar with either
cygwin on mingw?

Regards,

Nigel Stewart

Xavier Pianet wrote:
> Hi there,
> 
> See my post few weeks ago (29/10/2002)
> subject : conflicting types for `typedef struct mbstate_t`(was link troubles
> with wcslen)
> 
> also the one from zhang le on 27/10/2002
>   missing wcsncmp,wcscpy,wcsncpy and more...
> 
> or a search in the archives on wcslen
> 
> no one on the list acknowledged the pb (cfg ?) and i noticed that gcc-3.2-2
> probably solved issue 2) of my post because it had the following comment
> (msg [ANNOUNCEMENT] Updated: gcc-3.2-2 10/11/2002):
> 'However, the only noticeable change from the last release was an attempt to
> correctly define mbstate_t.'
> 
> I'm positive that wcslen is in newlib but i'm not sure for
> wcsncmp,wcscpy,wcsncpy as i didn't needed them a that time.
> 
> Xavier
> 
> "Nigel Stewart & Fiona Smith" <nigels@nigels.com> a écrit dans le message
> news: 3DD82975.1040600@nigels.com...
> 
>>Hello all,
>>
>>Having happily upgraded my Cygwin to include gcc 3.2, I've
>>encountered a show-stopper: The linker can't resolve symbols
>>involving wide C++ strings.  Here is an example:
>>
>>#include <string>
>>#include <iostream>
>>using namespace std;
>>
>>int main(int argc,char *argv[])
>>{
>>        std::string<wchar_t> test;
>>}
>>
>>-----------------
>>
>>$ g++ test.cpp
>>/cygdrive/c/DOCUME~1/nigels/LOCALS~1/Temp/ccHP4AMl.o(.text+0x25):test.cpp:
>>undefined reference to `std::basic_string<wch
>>ar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>
>> >::basic_string[in-charge]()'
>>/cygdrive/c/DOCUME~1/nigels/LOCALS~1/Temp/ccHP4AMl.o(.text+0x30):test.cpp:
>>undefined reference to `std::basic_string<wch
>>ar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>
>> >::~basic_string [in-charge]()'
>>collect2: ld returned 1 exit status
>>
>>---------------------------
>>
>>Any hints, suggestions, or duh-read-the FAQ responses, appreciated.
>>
>>Note that the following compiles & links:
>>
>>int main(int argc,char *argv[])
>>{
>>        std::string<double> test;
>>}
>>
>>----------------
>>
>>$ gcc -v
>>Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.2/specs
>>Configured with: /netrel/src/gcc-3.2-3/configure
>>--enable-languages=c,c++,f77,java --enable-libgcj --enable-threads=posi
>>x --with-system-zlib --enable-nls --without-included-gettext
>>--enable-interpreter --disable-sjlj-exceptions --disable-ve
>>rsion-specific-runtime-libs --enable-shared --build=i686-pc-linux
>>--host=i686-pc-cygwin --target=i686-pc-cygwin --enable
>>-haifa --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc
>>--libdir=/usr/lib --includedir=/nonexistent/include --libexecd
>>ir=/usr/sbin
>>Thread model: posix
>>gcc version 3.2 20020927 (prerelease)
>>
>>Cheers,
>>
>>Nigel Stewart


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gcc 3.2 string<wchar_t> link problem
  2003-02-05 14:22   ` Nigel Stewart & Fiona Smith
@ 2003-02-05 14:26     ` Christopher Faylor
  0 siblings, 0 replies; 7+ messages in thread
From: Christopher Faylor @ 2003-02-05 14:26 UTC (permalink / raw)
  To: cygwin

On Thu, Feb 06, 2003 at 01:23:08AM +1100, Nigel Stewart & Fiona Smith wrote:
>Has anyone else had progress with wchar with either cygwin on mingw?

I'm not aware of any activity in the cygwin arena.

cgf
--
Please use the resources at cygwin.com rather than sending personal email.
Special for spam email harvesters: send email to aaaspam@sourceware.org
and be permanently blocked from mailing lists at sources.redhat.com

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gcc 3.2 string<wchar_t> link problem
  2002-11-17 16:36 ` Nigel Stewart & Fiona Smith
@ 2002-11-17 20:39   ` Nigel Stewart & Fiona Smith
  0 siblings, 0 replies; 7+ messages in thread
From: Nigel Stewart & Fiona Smith @ 2002-11-17 20:39 UTC (permalink / raw)
  Cc: cygwin


Digging around the gcc.gnu.org site,
came across PR 4764 in the bugs
database:

http://gcc.gnu.org/cgi-bin/gnatsweb.pl

------------------------------------

*Description:*        

On Solaris 8, std::wstring is not available, because libstdc++/aclocal.m4
checks for too many functions

The following functions are not available on Solaris. They are
required to enable wide strings in libstdc++, but they aren't used
by the implementation:

vwscanf vfwscanf vswscanf wcstof

Notice that support for these functions is only mandated by ISO C99,
 not by ISO C++.

----------------------

Without being too familiar with gcc build
process, not sure how to resolve this
for Cygwin...

Cheers,

Nigel Stewart



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gcc 3.2 string<wchar_t> link problem
  2002-11-17 16:12 Danny Smith
@ 2002-11-17 16:36 ` Nigel Stewart & Fiona Smith
  2002-11-17 20:39   ` Nigel Stewart & Fiona Smith
  0 siblings, 1 reply; 7+ messages in thread
From: Nigel Stewart & Fiona Smith @ 2002-11-17 16:36 UTC (permalink / raw)
  To: cygwin

Hi Danny,

Thanks for the hint.  Does this mean that I need to rebuild libstc++?
My impression is that this is a bug: Either wchar_t is supported, or
it isn't, but that should be compile-error rather than link-error.
And also, since I've done a "full" Cygwin install, what more is needed
for wchar_t support?

Thanks,

Nigel Stewart

Danny Smith wrote:

>Look in /usr/include/c++/3.2/i686-pc-cygwin/bits/c++config.h
>// Define if code specialized for wchar_t should be used.
>/* #undef _GLIBCPP_USE_WCHAR_T */
>
>libstdc++ configure script could not find enough C runtime support to provide
>C++ wchar_t support.
>  
>


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gcc 3.2 string<wchar_t> link problem
@ 2002-11-17 16:12 Danny Smith
  2002-11-17 16:36 ` Nigel Stewart & Fiona Smith
  0 siblings, 1 reply; 7+ messages in thread
From: Danny Smith @ 2002-11-17 16:12 UTC (permalink / raw)
  To: cygwin; +Cc: nigels

gcc 3.2 string<wchar_t> link problem
From: Nigel Stewart & Fiona Smith <nigels at nigels dot com> 
To: cygwin at cygwin dot com 
Date: Mon, 18 Nov 2002 10:42:45 +1100 
Subject: gcc 3.2 string<wchar_t> link problem 
===snip===

> $ g++ test.cpp
> /cygdrive/c/DOCUME~1/nigels/LOCALS~1/Temp/ccHP4AMl.o(.text+0x25):test.cpp: >
> undefined reference to `std::basic_string<wch
> ar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_string[in->
> charge]()'
> /cygdrive/c/DOCUME~1/nigels/LOCALS~1/Temp/ccHP4AMl.o(.text+0x30):test.cpp: >
> undefined reference to `std::basic_string<wch
> ar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_string
[in-> charge]()'

Look in /usr/include/c++/3.2/i686-pc-cygwin/bits/c++config.h
// Define if code specialized for wchar_t should be used.
/* #undef _GLIBCPP_USE_WCHAR_T */

libstdc++ configure script could not find enough C runtime support to provide
C++ wchar_t support.

Danny

http://careers.yahoo.com.au - Yahoo! Careers
- 1,000's of jobs waiting online for you!

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-02-05 14:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-17 16:05 gcc 3.2 string<wchar_t> link problem Nigel Stewart & Fiona Smith
2002-11-18  6:49 ` Xavier Pianet
2003-02-05 14:22   ` Nigel Stewart & Fiona Smith
2003-02-05 14:26     ` Christopher Faylor
2002-11-17 16:12 Danny Smith
2002-11-17 16:36 ` Nigel Stewart & Fiona Smith
2002-11-17 20:39   ` Nigel Stewart & Fiona Smith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).