On Sun, Jun 8, 2014 at 5:58 AM, Erdem Demir <kerdemdemir@hotmail.com> wrote:

 gcc hello.c
/tmp/ccoiOZyQ.o:hello.c:(.text+0x5e): undefined reference to `_wcsncpy'
collect2: ld returned 1 exit status

Is there any way around for me ?  Even I think this is a problem with MSYS special gcc I downloaded all dev packages with mingw installiton manager and also updated the existing ones. 

I need _wsnncpy because I need to compile python. Python nags about wide char related functions like _wcsncpy. I need python badly because I need to recompile gdb with python option on my windows machine with help of MSYS.

Note: gcc options&version  
$ gcc -v
Reading specs from /usr/lib/gcc/i686-pc-msys/3.4.4/specs
Configured with: /home/cstrauss/build/gcc3/gcc-3.4.4/configure --prefix=/usr --s
ysconfdir=/etc --localstatedir=/var --infodir=/share/info --mandir=/share/man --
libexecdir=/lib --enable-languages=c,c++ --disable-nls --enable-threads=posix --
enable-sjlj-exceptions --enable-hash-synchronization --enable-libstdcxx-debug --
Thread model: posix
gcc version 3.4.4 (msys special)

The code above compiles with no issues for me, There seems to be something wrong your your configuration. Firstly, it looks like your using GCC 3.4.x, which IIRC does not support w strings.

The current release of MinGW comes with GCC 4.4 (I believe) and should allow the above code to compile.

You should re-download/install MinGW first. Place it in C:/MinGW and add C:/MinGW to your PATH variable.

Then you can either download Msys with the install manager or get it from SF.