delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/10/27/20:09:30

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
Message-ID: <005701c27e1e$54e86430$0100a8c0@xavier>
From: "Xavier Pianet" <xavier DOT pianet AT lusis DOT fr>
To: <cygwin AT cygwin DOT com>
Subject: link troubles with wcslen
Date: Mon, 28 Oct 2002 02:07:04 +0100
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700

Hi there
I noticed one person having same kind of troubles 2 weeks ago but i =3D
could'nt find a reply.

i'm using the following system :
> uname -a
CYGWIN_NT-5.0 NAME 1.3.14(0.62/3/2) 2002-10-24 10:48 i686 unknown
>g++ --version
g++ (GCC) 3.2 20020818 (prerelease)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is =
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR =
PURPOSE.

trying to compile de simple following code
--- start code Blah.cc ---
#include <wchar.h>
#include <stdio.h>

int main(int argc, char**argv)
{
     printf("wcslen: %d\n", wcslen((const wchar_t*)"abcd"));
     return 0;
}
--- end code ---

I can only manage to get errors :

>gcc -o Blah Blah.cc
/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccDaW1wr.o(.text+0x38):Blah.cc: 
undefined reference to `wcslen(wchar_t const*)'
/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccDaW1wr.o(.eh_frame+0x11):Blah.cc: 
undefined reference to `___gxx_personality_v0'
collect2: ld returned 1 exit status

or

>g++ -o Blah Blah.cc
/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccjicQ4o.o(.text+0x38):Blah.cc: 
undefined reference to `wcslen(wchar_t const*)'
collect2: ld returned 1 exit status


same results on :

--- start code Blah.cpp ---
#include <cwchar>
#include <iostream>

int main(int argc, char**argv)
{
     std::cout << "wcslen: " << wcslen((const wchar_t*)"abcd") << =3D
std::endl;
     return 0;
}
--- end code ---

compiled with

what libraries/flag am i missing for this piece of code to compile ?

Thanks in advance
Xavier

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019