Re: Building stdcxx-4.2.2 Using MinGW+MSYS On Windows XP (SP2)

2008-12-04 Thread Steve Petrie, P.Eng.
: `state_type' was not declared in this
scope
  ./include/rw/_traits.h:397: error: template argument 1 is invalid
  ./include/rw/_traits.h: In static member function `static int
std::char_traitschar::compare(const char*, const char*, unsigned int)':
  ./include/rw/_traits.h:420: error: `memcmp' is not a member of `std'
  ./include/rw/_traits.h: In static member function `static const char*
std::char_traitschar::find(const char*, unsigned int, const char)':
  ./include/rw/_traits.h:428: error: `memchr' is not a member of `std'
  ./include/rw/_traits.h: In static member function `static unsigned int
std::char_traitschar::length(const char*)':
  ./include/rw/_traits.h:434: error: `strlen' is not a member of `std'
  ./include/rw/_traits.h: In static member function `static char*
std::char_traitschar::move(char*, const char*, unsigned int)':
  ./include/rw/_traits.h:439: error: `memmove' is not a member of `std'
  ./include/rw/_traits.h: In static member function `static char*
std::char_traitschar::copy(char*, const char*, unsigned int)':
  ./include/rw/_traits.h:445: error: `memcpy' is not a member of `std'
  ./include/rw/_traits.h: In static member function `static char*
std::char_traitschar::assign(char*, unsigned int, char)':
  ./include/rw/_traits.h:451: error: `memset' is not a member of `std'
  ./include/rw/_traits.h: At global scope:
  ./include/rw/_traits.h:483: error: expected `;' before state_type
  ./include/rw/_traits.h:484: error: `state_type' was not declared in this
scope
  ./include/rw/_traits.h:484: error: template argument 1 is invalid
  ./include/rw/_traits.h: In static member function `static int
std::char_traitswchar_t::compare(const wchar_t*, const wchar_t*, unsigned
int)':
  ./include/rw/_traits.h:504: error: `wmemcmp' was not declared in this
scope
  ./include/rw/_traits.h: In static member function `static unsigned int
std::char_traitswchar_t::length(const wchar_t*)':
  ./include/rw/_traits.h:509: error: `wcslen' is not a member of `std'
  ./include/rw/_traits.h: In static member function `static const wchar_t*
std::char_traitswchar_t::find(const wchar_t*, unsigned int, const
wchar_t)':
  ./include/rw/_traits.h:515: error: `wmemchr' is not a member of `std'
  ./include/rw/_traits.h: In static member function `static wchar_t*
std::char_traitswchar_t::copy(wchar_t*, const wchar_t*, unsigned int)':
  ./include/rw/_traits.h:522: error: `wmemcpy' is not a member of `std'
  ./include/rw/_traits.h: In static member function `static wchar_t*
std::char_traitswchar_t::move(wchar_t*, const wchar_t*, unsigned int)':
  ./include/rw/_traits.h:528: error: `wmemmove' is not a member of `std'
  ./include/rw/_traits.h: In static member function `static wchar_t*
std::char_traitswchar_t::assign(wchar_t*, unsigned int, wchar_t)':
  ./include/rw/_traits.h:534: error: `wmemset' is not a member of `std'
  In file included from ./include/rw/_iosbase.h:36,
   from ./include/streambuf:39,
   from ./include/ostream:39,
   from ./include/istream:38,
   from ./include/iostream:33,
   from test_stdcxx_1.cpp:4:
  ./include/loc/_locale.h: At global scope:
  ./include/loc/_locale.h:403: error: `mbstate_t' is not a member of `std'
  ./include/loc/_locale.h:403: error: `mbstate_t' is not a member of `std'
  ./include/loc/_locale.h:403: error: template argument 3 is invalid
  ./include/loc/_locale.h:470: error: `mbstate_t' is not a member of `std'
  ./include/loc/_locale.h:470: error: `mbstate_t' is not a member of `std'
  ./include/loc/_locale.h:470: error: template argument 3 is invalid
I've tried using a -Z parameter with the g++.exe command, but g++.exe
still won't generate an object file.

The first file cwchar that g++.exe is complaining that it can't find, does
exist. It's in directory ./include/ansi/ I tried copying file cwchar to
./include/ but this didn't fix the first compiler error.

* * *
* * *
.
Any suggestions you could make, would be most appreciated. Or, if you could
compile and link my minimal test program test_stdcxx_1.cpp under your
MinGW+MSYS, and tell me how you did it, that would be even better.

Thanks.

Steve

- Original Message - 
From: Farid Zaripov [EMAIL PROTECTED]

To: user@stdcxx.apache.org
Sent: Wednesday, December 03, 2008 3:51 AM
Subject: Re: Building stdcxx-4.2.2 Using MinGW+MSYS On Windows XP (SP2)



HOWEVER, after the completion of the ar rv   libstd11s.a ... command
executed near the very end of the build process, the following was
displayed
on the MSYS console, and the build process stopped:


[...]

  i:\apps\mingw\bin\ar.exe: creating libstd11s.a
  gencat rwstderr.cat /stdcxx-4.2.2/src/rwstderr.msg
  /bin/sh: gencat: command not found
  make[2]: [rwstderr.cat] Error 127 (ignored)


 It's ok. The rwstderr.cat catalog file is used for overriding standard
exceptions
what() messages (i.e. to have localized messages). On MinGW (as well as on
entire Windows) stdcxx doesn't using rwstderr.cat

Re: Building stdcxx-4.2.2 Using MinGW+MSYS On Windows XP (SP2)

2008-12-04 Thread Martin Sebor

Steve Petrie, P.Eng. wrote:
[...]

I use the following MSYS console shell command, to compile the
test_stdcxx_1.cpp program:

 g++.exe -I./include -nostdinc++ -nostdinc -nostdlib -c -o test_stdcxx_1.o
test_stdcxx_1.cpp


You also need -I./include/ansi. Its also a good idea to avoid
using the g++ command and use gcc instead just to make it 100%
clear that the native C++ Standard Library should not be linked
(unless you know better , I don't think you want -nostdlib as
it normally prevents linking with files you want to link with).



(Note the dot . between -I and /include. I have an stdcxx include
directory, with all its sub-directories, as a sub-directory of the 
directory
where the test_stdcxx_1.cpp source program is located, because I haven't 
yet

been able to figure out how to get g++.exe to respect a -I parameter
pointing to a more complex path description. The include directory, with
all its sub-directories, is a copy of what is shipped with stdcxx-4.2.2.)

g++.exe displays the following compile errors on the MSYS console:

  In file included from ./include/rw/_traits.h:40,
   from ./include/rw/_strref.h:48,
   from ./include/string:43,
   from ./include/loc/_locale.h:36,
   from ./include/rw/_iosbase.h:36,
   from ./include/streambuf:39,
   from ./include/ostream:39,
   from ./include/istream:38,
   from ./include/iostream:33,
   from test_stdcxx_1.cpp:4:
  ./include/rw/_mbstate.h:195:27: cwchar: No such file or directory


That's because you're missing -Iinlude/ansi -- that's where
our cwchar lives. All the errors after this one should clear
up after you add it.

Martin


Re: Building stdcxx-4.2.2 Using MinGW+MSYS On Windows XP (SP2)

2008-12-03 Thread Farid Zaripov
 HOWEVER, after the completion of the ar rv   libstd11s.a ... command
 executed near the very end of the build process, the following was displayed
 on the MSYS console, and the build process stopped:

[...]
   i:\apps\mingw\bin\ar.exe: creating libstd11s.a
   gencat rwstderr.cat /stdcxx-4.2.2/src/rwstderr.msg
   /bin/sh: gencat: command not found
   make[2]: [rwstderr.cat] Error 127 (ignored)

  It's ok. The rwstderr.cat catalog file is used for overriding standard 
exceptions
what() messages (i.e. to have localized messages). On MinGW (as well as on
entire Windows) stdcxx doesn't using rwstderr.cat, but using rwstderr.dll 
instead.
Actually if you're fine with english messages, you don't need rwstderr.{cat|dll}
because of the english messages are hardcoded in library sources.

 Would please tell me, what do I need to do, to get the gencat.exe utility to
 accept the rwstderr.msg file?

  On Windows gencat.exe acceps rwstderr.rc file and produces rwstderr.dll file.

Farid.