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

2008-12-04 Thread Steve Petrie, P.Eng.

Hi Farid:

[FZ]
 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.

[SP]
Thanks to your previous assistance, I did succeed in using the GNUmakefile
under MinGW+MSYS, to build a stdcxx libnary libstd11s.a.

HOWEVER, I've been trying without success, to compile a minimal C++ program
under MinGW+MSYS, using the Apache C++ Standard Library (stdcxx), instead of
the Standard Library that is shipped with MinGW+MSYS.

* * *
* * *

The MinGW_MSYS environment, will compile, link and run the following test
program, using the Standard Library shipped with MinGW_MSYS:

  // test_mingw.cpp ...

  // standard library includes...
   #include iostream
  // ...standard library includes.

  using std::cout;

  int main (void)
  {
  cout  Hello from test_mingw.cpp!\n;

  return 0;
  }
  // ... test_mingw.cpp.

I use the following MSYS console shell commands to compile and link the
test_mingw.cpp program:

  g++  -c  -o test_mingw.o  test_mingw.cpp  # compiles ok.
  g++  -o test_mingw test_mingw.o   # links ok.

The test_mingw.exe program produce by ld, runs fine and displays the
following on the MSYS console:

  Hello from test_mingw.cpp!.

* * *
* * *

HOWEVER, so far I have not found a way to compile a similar minimal C++
program under MinGW+MSYS, using the Apache C++ Standard Library (stdcxx),
instead of the Standard Library that is shipped with MinGW+MSYS.

The minimal C++ program I'm trying to compile is:

 // test_stdcxx_1.cpp ...

  // standard library includes...
   #include iostream
  // ...standard library includes.

  using std::cout;

  int main (void)
  {
  cout  Hello from test_stdcxx_1.cpp!\n;

  return 0;
  }
  // ... test_stdcxx_1.cpp.

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

(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
  In file included 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/_traits.h:104:51: cstring: No such file or directory
  In file included 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/_traits.h:302: error: expected `;' before state_type
  ./include/rw/_traits.h:303: error: `state_type' was not declared in this
scope
  ./include/rw/_traits.h:303: error: template argument 1 is invalid
  ./include/rw/_traits.h: In static member function `static _CharT*
std::char_traits_CharT::move(_CharT*, const _CharT*, unsigned int)':
  ./include/rw/_traits.h:347: error: `memmove' is not a member of `std'
  ./include/rw/_traits.h: In static member function `static _CharT*
std::char_traits_CharT::copy(_CharT*, const _CharT*, unsigned int)':
  ./include/rw/_traits.h:353: error: `memcpy' is not a member of `std'
  ./include/rw/_traits.h: At global scope:
  ./include/rw/_traits.h:396: error: expected `;' before state_type
  ./include/rw/_traits.h:397: 

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

2008-11-27 Thread Steve Petrie, P.Eng.

[MS]

Right. I think a build directory gets created automatically
when one isn't specified on the command line (via BUILDDIR).
Something weird seems to be going on in Steve's environment
(the behavior of ln -s is definitely bizarre)...



[SP]
Yes there is something wierd. Please see my response to Farid's message,
regarding a test shell script I created, to replicate the MinGW+MSYS ln
problem.

But I've got a workaround for the problem. And Farid says my stdcxx build is
now working. So no big deal.

I'm only using MinGW+MSYS for compiling and building C++ programs through
the NetBeans IDE (with C++ plugin). That all seems to work fine. It's the
comparably far more complex process of building the stdcxx library, that is
stressing my MinGW+MSYS. But I want to use stdcxx because it seems to me
likely to be superior to the standard library shipped with g++, so I don't
mind at all working through the glitches to get stdcxx built and working.

* * *
* * *

[MS] There is an /stdcxx-4.2.2/build/liblibstd.a file of size 2.33 MB.


  My congratulations, you have just build the stdcxx library :)


Although it probably shouldn't be called liblibstd, should it?
What's with the duplicate lib part?



[SP]
It's lack of sleep -- the correct pathname is
/stdcxx-4.2.2/build/lib/libstd.a

Steve

- Original Message - 
From: Martin Sebor [EMAIL PROTECTED]

To: user@stdcxx.apache.org
Sent: Thursday, November 27, 2008 3:05 PM
Subject: Re: Building stdcxx-4.2.1 Using MinGW+MSYS On Windows XP (SP2)



Farid Zaripov wrote:
[...]

Fix #2 -- Your /stdcxx-4.2.2/build file:

I renamed the /stdcxx-4.2.2/build file that came with the svn download,
to
/stdcxx-4.2.1/build_faridz, because the presence of the build FILE was
preventing the GNUmakefile from creating the /stdcxx-4.2.2/build/
DIRECTORY.


  Hmm, you must be wrong, we don't have any file with the name build in
svn.


Right. I think a build directory gets created automatically
when one isn't specified on the command line (via BUILDDIR).
Something weird seems to be going on in Steve's environment
(the behavior of ln -s is definitely bizarre)...



[...]


There is an /stdcxx-4.2.2/build/liblibstd.a file of size 2.33 MB.


  My congratulations, you have just build the stdcxx library :)


Although it probably shouldn't be called liblibstd, should it?
What's with the duplicate lib part?

Martin





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

2008-11-25 Thread Steve Petrie

Posting the files in the Nabble Message box hangs my Firefox (the file are
quite big) so I'm trying the Upload File... button above the Nabble
Message box...

http://www.nabble.com/file/p20695038/config.h config.h 

http://www.nabble.com/file/p20695038/config.log config.log 


Martin Sebor-2 wrote:
 
 
 Could you post here the config.h and config.log files from the
 $BUILDDIR/include directory?
 
 Martin
 
 

-- 
View this message in context: 
http://www.nabble.com/Building-stdcxx-4.2.1-Using-MinGW%2BMSYS-On-Windows-XP-%28SP2%29-tp20672758p20695038.html
Sent from the stdcxx-user mailing list archive at Nabble.com.