2012-07-29 09:08, Mohsen Pahlevanzadeh skrev:
Dear all,
I need to compile libsigc as static program into my appl.So, i
configure such as:
./configure --prefix=/opt/libsigc++/ --disable-shared --enable-static
But when i use make command, i get the following error:
//////////////////////////////////////////////////////////////////////
In file included from ../sigc++/signal.h:8:0,
from signal.cc:20:
../sigc++/signal_base.h:46:11: error: 'size_t' does not name a type
../sigc++/signal_base.h:95:3: error: 'size_type' does not name a type
../sigc++/signal_base.h:239:11: error: 'size_t' does not name a type
../sigc++/signal_base.h:261:3: error: 'size_type' does not name a type
In file included from signal.cc:20:0:
../sigc++/signal.h:33:11: error: 'size_t' does not name a type
../sigc++/signal.h:34:11: error: 'ptrdiff_t' does not name a type
../sigc++/signal.h:99:11: error: 'size_t' does not name a type
../sigc++/signal.h:100:11: error: 'ptrdiff_t' does not name a type
../sigc++/signal.h:276:11: error: 'size_t' does not name a type
../sigc++/signal.h:277:11: error: 'ptrdiff_t' does not name a type
../sigc++/signal.h:359:11: error: 'size_t' does not name a type
../sigc++/signal.h:360:11: error: 'ptrdiff_t' does not name a type
../sigc++/signal.h:430:11: error: 'size_t' does not name a type
../sigc++/signal.h:431:11: error: 'ptrdiff_t' does not name a type
../sigc++/signal.h:515:11: error: 'size_t' does not name a type
../sigc++/signal.h:516:11: error: 'ptrdiff_t' does not name a type
make[3]: *** [signal.lo] Error 1
make[3]: Leaving directory `/home/mohsen/Downloads/eCom tools/libsigc
++-2.2.0/sigc++'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/mohsen/Downloads/eCom tools/libsigc
++-2.2.0/sigc++'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/mohsen/Downloads/eCom tools/libsigc
++-2.2.0'
make: *** [all] Error 2
//////////////////////////////////////////////////////////////////////
How can i solve it?
Yours,
Mohsen.
When I try "./configure --disable-shared --enable-static ......; make"
with gcc 4.6.3 there are no compilation errors.
But when I look at the source code of sigc++/signal_base.h and
sigc++/signal.h, I see that it's not correct.
sigc++/signal_base.h contains
#include <cstddef>
which shall declare size_t and ptrdiff_t in namespace std. But size_t
and ptrdiff_t are then used as if they were declared in global namespace.
Which compiler do you use? I wonder if you are one of the first persons
who try to build libsigc++ with a compiler and a standard library that
don't declare data types in more namespaces than required.
(I think it's like this: <cstddef> *must* declare size_t and ptrdiff_t
in namespace std and *may* also declare them in global namespace.
<stddef.h> when included in a C++ program, *must* declare size_t and
ptrdiff_t in global namespace and *may* also declare them in namespace std.)
You can try changing
#include <cstddef>
in sigc++/signal_base.h to
#include <stddef.h>
and see if you can build libsigc++.
It would be fine if you could file a bug report. I think a fix in
libsigc++ is needed.
Do you know that the LGPL license restricts your rights to link
libsigc++ statically? I don't know all the details. Check with the long
license text, if in doubt. I think that if you link statically, your
resulting program or library must be released under the GPL or LGPL license.
Kjell
_______________________________________________
libsigc-list mailing list
libsigc-list@gnome.org
https://mail.gnome.org/mailman/listinfo/libsigc-list