Hi,
While using gmp library (from libports) in a c project works fine, including gmp in a c++ project throws the following compiler errors. Any insight on what could be going wrong here?
Program app/src/test-ml COMPILE main.o In file included from /home/kc/install/omnios/genode/ml/src/app/src/main.cc:1: /home/kc/install/omnios/genode/libports/include/gmp/x86_32/gmp.h:24:70: warning: iosfwd: No such file or directory /home/kc/install/omnios/genode/libports/include/gmp/x86_32/gmp.h:25:18: warning: cstdio: No such file or directory /home/kc/install/omnios/genode/libports/include/gmp/x86_32/gmp.h:51:40: warning: cstddef: No such file or directory In file included from /home/kc/install/omnios/genode/ml/src/app/src/main.cc:1: /home/kc/install/omnios/genode/libports/include/gmp/x86_32/gmp.h:538: error: 'std::FILE' has not been declared /home/kc/install/omnios/genode/libports/include/gmp/x86_32/gmp.h:542: error: expected ',' or '...' before '(' token /home/kc/install/omnios/genode/libports/include/gmp/x86_32/gmp.h:547: error: expected ',' or '...' before '(' token /home/kc/install/omnios/genode/libports/include/gmp/x86_32/gmp.h:624: error: 'size_t' has not been declared In file included from /home/kc/install/omnios/genode/ml/src/app/src/main.cc:1: /home/kc/install/omnios/genode/libports/include/gmp/x86_32/gmp.h:807: error: 'size_t' has not been declared /home/kc/install/omnios/genode/libports/include/gmp/x86_32/gmp.h:807: error: 'size_t' has not been declared /home/kc/install/omnios/genode/libports/include/gmp/x86_32/gmp.h:807: error: 'size_t' has not been declared /home/kc/install/omnios/genode/libports/include/gmp/x86_32/gmp.h:904: error: 'size_t' has not been declared /home/kc/install/omnios/genode/libports/include/gmp/x86_32/gmp.h:904: error: 'size_t' has not been declared /home/kc/install/omnios/genode/libports/include/gmp/x86_32/gmp.h:904: error: 'size_t' has not been declared /home/kc/install/omnios/genode/libports/include/gmp/x86_32/gmp.h:1092: error: 'size_t' does not name a type /home/kc/install/omnios/genode/libports/include/gmp/x86_32/gmp.h:1096: error: 'size_t' does not name a type /home/kc/install/omnios/genode/libports/include/gmp/x86_32/gmp.h:1353: error: 'size_t' has not been declared /home/kc/install/omnios/genode/libports/include/gmp/x86_32/gmp.h:1444: error: 'size_t' does not name a type /home/kc/install/omnios/genode/libports/include/gmp/x86_32/gmp.h:1533: error: 'size_t' does not name a type /home/kc/install/omnios/genode/libports/include/gmp/x86_32/gmp.h:1590: error: 'size_t' has not been declared /home/kc/install/omnios/genode/libports/include/gmp/x86_32/gmp.h:1790: error: 'size_t' does not name a type /home/kc/install/omnios/genode/libports/include/gmp/x86_32/gmp.h:2180: error: expected constructor, destructor, or type conversion before '&' token /home/kc/install/omnios/genode/libports/include/gmp/x86_32/gmp.h:2181: error: expected constructor, destructor, or type conversion before '&' token /home/kc/install/omnios/genode/libports/include/gmp/x86_32/gmp.h:2182: error: expected constructor, destructor, or type conversion before '&' token /home/kc/install/omnios/genode/libports/include/gmp/x86_32/gmp.h:2183: error: expected constructor, destructor, or type conversion before '&' token /home/kc/install/omnios/genode/libports/include/gmp/x86_32/gmp.h:2184: error: expected constructor, destructor, or type conversion before '&' token /home/kc/install/omnios/genode/libports/include/gmp/x86_32/gmp.h:2185: error: expected constructor, destructor, or type conversion before '&' token make[2]: *** [main.o] Error 1 make[1]: *** [test-ml.prg] Error 2 make: *** [gen_deps_and_build_targets] Error 2
Thanks kc
Hello,
from the error log, I gather that the GMP header file expects the C++ standard library to be present, which is apparently not the case on Genode. As an interim solution, you may follow the advice given in the following thread:
https://sourceforge.net/mailarchive/message.php?msg_id=27171714
Please report if that works for you. If so, we might wrap the solution into a simple-to-use Genode library and include it in the next release.
Cheers Norman
Norman,
That fixed the issue.
Thanks kc
On 7/27/11 11:35 AM, Norman Feske wrote:
Hello,
from the error log, I gather that the GMP header file expects the C++ standard library to be present, which is apparently not the case on Genode. As an interim solution, you may follow the advice given in the following thread:
https://sourceforge.net/mailarchive/message.php?msg_id=27171714
Please report if that works for you. If so, we might wrap the solution into a simple-to-use Genode library and include it in the next release.
Cheers Norman