[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: safer way to use gnulib ('C++' + 'gnulib' does not still work on Min
From: |
Tatsuro MATSUOKA |
Subject: |
Re: safer way to use gnulib ('C++' + 'gnulib' does not still work on MinGW ) |
Date: |
Mon, 22 Mar 2010 19:50:34 +0900 (JST) |
Hello
The previous mail
http://www-old.cae.wisc.edu/pipermail/octave-maintainers/2010-March/015556.html
--- Tatsuro MATSUOKA wrote:
::::::::::::::::::::::
> # if 1
> # if 1
> //# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
> # define nanosleep rpl_nanosleep
> //# endif
>
> If the comment out like above are carried out for the declaration error from
> the same origin,
> compile
> goes well.
:::::::::::::::::::::::
Perhaps the above situation comes from some miss setting of gnulib on octave.
I have personally made libgnu library for time and nanosleep modules from
gnulib directory of octave.
cd /cygdrive/c/usr/tatsu/test/testgnu
/cygdrive/c/usr/tatsu/mingwhome/octaves/hg/octave-work/gnulib/gnulib-tool
--create-testdir
--dir=/cygdrive/c/usr/tatsu/test/testgnu/time time nanosleep
cd time
./configure
make
cd ..
rm *.o
g++ -c testcc.cc -I./time/gllib
// testcc.cc
#include <iostream>
int main(void)
{
nanosleep();
return 0;
}
//
Obviously the above incorrect code, the error massages are
$ g++ -c testcc.cc -I./time/gllib
In file included from ./time/gllib/wchar.h:64:0,
from
c:\programs\mingw\bin\../lib/gcc/mingw32/4.5.0/include/c++/cwchar:47,
from
c:\programs\mingw\bin\../lib/gcc/mingw32/4.5.0/include/c++/bits/postypes.h:42,
from
c:\programs\mingw\bin\../lib/gcc/mingw32/4.5.0/include/c++/iosfwd:42,
from
c:\programs\mingw\bin\../lib/gcc/mingw32/4.5.0/include/c++/ios:39,
from
c:\programs\mingw\bin\../lib/gcc/mingw32/4.5.0/include/c++/ostream:40,
from
c:\programs\mingw\bin\../lib/gcc/mingw32/4.5.0/include/c++/iostream:40,
from testcc.cc:1:
./time/gllib/time.h:374:1: error: expected ',' or '...' before '__timer'
./time/gllib/time.h:374:1: error: nonnull argument with out-of-range operand
number (argument 1,
operand 2)
./time/gllib/time.h:389:1: error: expected ',' or '...' before '__timer'
./time/gllib/time.h:389:1: error: nonnull argument with out-of-range operand
number (argument 1,
operand 2)
./time/gllib/time.h:410:1: error: expected ',' or '...' before '__buf'
./time/gllib/time.h:410:1: error: nonnull argument with out-of-range operand
number (argument 1,
operand 2)
testcc.cc: In function 'int main()':
testcc.cc:4:12: error: too few arguments to function 'int rpl_nanosleep(const
rpl_timespec*,
rpl_timespec*)'
./time/gllib/time.h:339:1: note: declared here
#*****************
The point I would like to say that
too few arguments to function 'int rpl_nanosleep(const rpl_timespec*,
rpl_timespec*)'
symbol rpl_nanosleep recognized correctly.
In time.h
There found
#define _GL_CXXALIAS_RPL(func,rettype,parameters) \
_GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
#if defined __cplusplus && defined GNULIB_NAMESPACE
# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
namespace GNULIB_NAMESPACE \
{ \
rettype (*const func) parameters = ::rpl_func; \
} \
_GL_EXTERN_C int _gl_cxxalias_dummy
#else
# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
_GL_EXTERN_C int _gl_cxxalias_dummy
#endif
If the above is correctly , rpl_'ed functions can be called from C++ program.
However, the current situation in building octave on the MinGW are different
from the simple test.
This is all that I can say at present.
Regards
Tatsuro
--------------------------------------
VANCOUVER 2010 PARALYMPIC GAMES News
http://pr.mail.yahoo.co.jp/para/
- Re: safer way to use gnulib, (continued)
- Re: safer way to use gnulib, Michael Goffioul, 2010/03/20
- Re: safer way to use gnulib, Tatsuro MATSUOKA, 2010/03/21
- Re: safer way to use gnulib, Michael Goffioul, 2010/03/21
- Re: safer way to use gnulib, Tatsuro MATSUOKA, 2010/03/21
- Re: safer way to use gnulib, Marco Atzeri, 2010/03/21
- Re: safer way to use gnulib, Michael Goffioul, 2010/03/21
- Re: safer way to use gnulib, Tatsuro MATSUOKA, 2010/03/21
- Re: safer way to use gnulib, Marco Atzeri, 2010/03/21
- Re: safer way to use gnulib, John W. Eaton, 2010/03/21
- Re: safer way to use gnulib ('C++' + 'gnulib' does not still work on MinGW ), Tatsuro MATSUOKA, 2010/03/21
- Re: safer way to use gnulib ('C++' + 'gnulib' does not still work on MinGW ),
Tatsuro MATSUOKA <=
- Re: safer way to use gnulib ('C++' + 'gnulib' does not still work on MinGW ), Tatsuro MATSUOKA, 2010/03/23
- Re: safer way to use gnulib ('C++' + 'gnulib' does not still work on MinGW ), Tatsuro MATSUOKA, 2010/03/23