| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| To: | cygwin AT cygwin DOT com |
| X-Injected-Via-Gmane: | http://gmane.org/ |
| Path: | not-for-mail |
| From: | Shankar Unni <shankar AT cotagesoft DOT com> |
| Subject: | Re: link troubles with wcslen |
| Date: | Mon, 28 Oct 2002 10:10:26 -0800 |
| Lines: | 24 |
| Message-ID: | <3DBD7D92.6050407@cotagesoft.com> |
| References: | <005701c27e1e$54e86430$0100a8c0 AT xavier> |
| NNTP-Posting-Host: | adsl-64-165-207-58.dsl.snfc21.pacbell.net |
| Mime-Version: | 1.0 |
| X-Trace: | main.gmane.org 1035828552 21712 64.165.207.58 (28 Oct 2002 18:09:12 GMT) |
| X-Complaints-To: | usenet AT main DOT gmane DOT org |
| NNTP-Posting-Date: | Mon, 28 Oct 2002 18:09:12 +0000 (UTC) |
| User-Agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 (Compact) |
| X-Accept-Language: | en-us, en |
On 10/27/2002 5:07 PM, Xavier Pianet wrote:
> I can only manage to get errors :
> /c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccDaW1wr.o(.text+0x38):Blah.cc:
> undefined reference to `wcslen(wchar_t const*)'
This looks like the "wcslen" declaration isn't being protected by an
'extern "C"' block.
I notice that you're compiling "Blah.cc" with "gcc" instead of "g++". In
1.3.12 (I'm still on this, which uses gcc 2.95.3), this seems to work: I
can compile the sample program with "gcc wcslen.cc", and it uses C++
compilation rules throughout to compile.
What the above error seems to suggest is that the "gcc foo.cc" seems to
*preprocess* the source as if it were C (thus not expanding the
BEGIN_DECLS and END_DECLS macros to extern "C" {, etc.), but is
*compiling* them as C++ (generating mangled external names).
Xavier: can you do the compilation using "-v" and post the output as an
attachment? ("gcc -v -o Blah Blah.cc")
--
Shankar.
--
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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |