Related
I have ported my Eclipse project from Ubuntu 16.04, Eclipse version Oxygen to Ubuntu 18.04, the latest Eclipse Version. The tool chain which supported the old program is also installed.
I have ensured that all the environment variables of the tool chain used in the old projects is replicated in the Environment Variable of the new Eclipse. However the following compiler error occurs
typedef pthread_mutex_t __gthread_mutex_t;
^~~~~~~~~~~~~~~
pthread_mutex_init
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:51:9: error: ‘pthread_mutex_t’ does not name a type; did you mean ‘pthread_mutex_init’?
typedef pthread_mutex_t __gthread_recursive_mutex_t;
^~~~~~~~~~~~~~~
pthread_mutex_init
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:52:9: error: ‘pthread_cond_t’ does not name a type; did you mean ‘pthread_cond_wait’?
typedef pthread_cond_t __gthread_cond_t;
^~~~~~~~~~~~~~
pthread_cond_wait
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:108:1: error: ‘pthread_self’ was not declared in this scope
__gthrw(pthread_self)
^
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:108:1: note: suggested alternative: ‘pthread_yield’
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:659:19: error: ‘__gthread_t’ was not declared in this scope
__gthread_create (__gthread_t *__threadid, void *(*__func) (void*),
^~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:659:19: note: suggested alternative: ‘__gthrw_’
__gthread_create (__gthread_t *__threadid, void *(*__func) (void*),
^~~~~~~~~~~
__gthrw_
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:659:32: error: ‘__threadid’ was not declared in this scope
__gthread_create (__gthread_t *__threadid, void *(*__func) (void*),
^~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:659:32: note: suggested alternative: ‘pthread_yield’
__gthread_create (__gthread_t *__threadid, void *(*__func) (void*),
^~~~~~~~~~
pthread_yield
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:659:44: error: expected primary-expression before ‘void’
__gthread_create (__gthread_t *__threadid, void *(*__func) (void*),
^~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:660:5: error: expected primary-expression before ‘void’
void *__args)
^~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:666:17: error: ‘__gthread_t’ was not declared in this scope
__gthread_join (__gthread_t __threadid, void **__value_ptr)
^~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:666:17: note: suggested alternative: ‘__gthread_join’
__gthread_join (__gthread_t __threadid, void **__value_ptr)
^~~~~~~~~~~
__gthread_join
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:666:41: error: expected primary-expression before ‘void’
__gthread_join (__gthread_t __threadid, void **__value_ptr)
^~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:672:19: error: ‘__gthread_t’ was not declared in this scope
__gthread_detach (__gthread_t __threadid)
^~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:672:19: note: suggested alternative: ‘__gthread_join’
__gthread_detach (__gthread_t __threadid)
^~~~~~~~~~~
__gthread_join
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:678:36: note: suggested alternative: ‘__gthread_join’
__gthread_equal (__gthread_t __t1, __gthread_t __t2)
^~~~~~~~~~~
__gthread_join
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:683:15: error: ‘__gthread_t’ does not name a type; did you mean ‘__gthread_join’?
static inline __gthread_t
^~~~~~~~~~~
__gthread_join
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:696:17: error: ‘__gthread_once_t’ was not declared in this scope
__gthread_once (__gthread_once_t *__once, void (*__func) (void))
^~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:696:17: note: suggested alternative: ‘__gthread_once’
__gthread_once (__gthread_once_t *__once, void (*__func) (void))
^~~~~~~~~~~~~~~~
__gthread_once
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:696:35: error: ‘__once’ was not declared in this scope
__gthread_once (__gthread_once_t *__once, void (*__func) (void))
^~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:696:35: note: suggested alternative: ‘clone’
__gthread_once (__gthread_once_t *__once, void (*__func) (void))
^~~~~~
clone
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:696:50: error: ‘__func’ was not declared in this scope
__gthread_once (__gthread_once_t *__once, void (*__func) (void))
^~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:696:50: note: suggested alternative: ‘__unix’
__gthread_once (__gthread_once_t *__once, void (*__func) (void))
^~~~~~
__unix
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:696:59: error: expected primary-expression before ‘void’
__gthread_once (__gthread_once_t *__once, void (*__func) (void))
^~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:705:23: error: ‘__gthread_key_t’ was not declared in this scope
__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
^~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:705:23: note: suggested alternative: ‘__gthread_time_t’
__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
^~~~~~~~~~~~~~~
__gthread_time_t
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:705:40: error: ‘__key’ was not declared in this scope
__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
^~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:705:40: note: suggested alternative: ‘__k8’
__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
^~~~~
__k8
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:705:54: error: ‘__dtor’ was not declared in this scope
__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
^~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:705:54: note: suggested alternative: ‘__wur’
__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
^~~~~~
__wur
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:705:63: error: expected primary-expression before ‘void’
__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
^~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:711:23: error: ‘__gthread_key_t’ was not declared in this scope
__gthread_key_delete (__gthread_key_t __key)
^~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:711:23: note: suggested alternative: ‘__gthread_time_t’
__gthread_key_delete (__gthread_key_t __key)
^~~~~~~~~~~~~~~
__gthread_time_t
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:717:24: error: ‘__gthread_key_t’ was not declared in this scope
__gthread_getspecific (__gthread_key_t __key)
^~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:717:24: note: suggested alternative: ‘__gthread_time_t’
__gthread_getspecific (__gthread_key_t __key)
^~~~~~~~~~~~~~~
__gthread_time_t
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:723:24: error: ‘__gthread_key_t’ was not declared in this scope
__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
^~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:723:24: note: suggested alternative: ‘__gthread_time_t’
__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
^~~~~~~~~~~~~~~
__gthread_time_t
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:723:47: error: expected primary-expression before ‘const’
__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
^~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:729:32: error: variable or field ‘__gthread_mutex_init_function’ declared void
__gthread_mutex_init_function (__gthread_mutex_t *__mutex)
^~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:729:32: error: ‘__gthread_mutex_t’ was not declared in this scope
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:729:32: note: suggested alternative: ‘__gthread_time_t’
__gthread_mutex_init_function (__gthread_mutex_t *__mutex)
^~~~~~~~~~~~~~~~~
__gthread_time_t
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:736:26: error: ‘__gthread_mutex_t’ was not declared in this scope
__gthread_mutex_destroy (__gthread_mutex_t *__mutex)
^~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:736:26: note: suggested alternative: ‘__gthread_time_t’
__gthread_mutex_destroy (__gthread_mutex_t *__mutex)
^~~~~~~~~~~~~~~~~
__gthread_time_t
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:745:23: error: ‘__gthread_mutex_t’ was not declared in this scope
__gthread_mutex_lock (__gthread_mutex_t *__mutex)
^~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:745:23: note: suggested alternative: ‘__gthread_mutex_lock’
__gthread_mutex_lock (__gthread_mutex_t *__mutex)
^~~~~~~~~~~~~~~~~
__gthread_mutex_lock
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:745:42: error: ‘__mutex’ was not declared in this scope
__gthread_mutex_lock (__gthread_mutex_t *__mutex)
^~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:754:45: note: suggested alternative: ‘__multc3’
__gthread_mutex_trylock (__gthread_mutex_t *__mutex)
^~~~~~~
__multc3
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:764:28: error: ‘__gthread_mutex_t’ was not declared in this scope
__gthread_mutex_timedlock (__gthread_mutex_t *__mutex,
^~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:764:28: note: suggested alternative: ‘__gthread_mutex_lock’
__gthread_mutex_timedlock (__gthread_mutex_t *__mutex,
^~~~~~~~~~~~~~~~~
__gthread_mutex_lock
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:764:47: error: ‘__mutex’ was not declared in this scope
__gthread_mutex_timedlock (__gthread_mutex_t *__mutex,
^~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:764:47: note: suggested alternative: ‘__multc3’
__gthread_mutex_timedlock (__gthread_mutex_t *__mutex,
^~~~~~~
__multc3
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:765:7: error: expected primary-expression before ‘const’
const __gthread_time_t *__abs_timeout)
^~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:775:25: error: ‘__gthread_mutex_t’ was not declared in this scope
__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
^~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:775:25: note: suggested alternative: ‘__gthread_mutex_lock’
__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
^~~~~~~~~~~~~~~~~
__gthread_mutex_lock
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:775:44: error: ‘__mutex’ was not declared in this scope
__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
^~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:775:44: note: suggested alternative: ‘__multc3’
__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
^~~~~~~
__multc3
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:808:33: error: ‘__gthread_recursive_mutex_t’ was not declared in this scope
__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:808:33: note: suggested alternative: ‘__gthread_recursive_mutex_lock’
__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
__gthread_recursive_mutex_lock
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:808:62: error: ‘__mutex’ was not declared in this scope
__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
^~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:808:62: note: suggested alternative: ‘__multc3’
__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
^~~~~~~
__multc3
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:814:36: error: ‘__gthread_recursive_mutex_t’ was not declared in this scope
__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:821:67: note: suggested alternative: ‘__multc3’
__gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex,
^~~~~~~
__multc3
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:822:10: error: expected primary-expression before ‘const’
const __gthread_time_t *__abs_timeout)
^~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:829:35: error: ‘__gthread_recursive_mutex_t’ was not declared in this scope
__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:829:35: note: suggested alternative: ‘__gthread_recursive_mutex_lock’
__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
__gthread_recursive_mutex_lock
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:829:64: error: ‘__mutex’ was not declared in this scope
__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
^~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:829:64: note: suggested alternative: ‘__multc3’
__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
^~~~~~~
__multc3
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:835:36: error: ‘__gthread_recursive_mutex_t’ was not declared in this scope
__gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *__mutex)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:835:65: error: ‘__mutex’ was not declared in this scope
__gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *__mutex)
^~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:835:65: note: suggested alternative: ‘__multc3’
__gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *__mutex)
^~~~~~~
__multc3
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:850:27: error: ‘__gthread_cond_t’ was not declared in this scope
__gthread_cond_broadcast (__gthread_cond_t *__cond)
^~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:850:27: note: suggested alternative: ‘__gthread_once’
__gthread_cond_broadcast (__gthread_cond_t *__cond)
^~~~~~~~~~~~~~~~
__gthread_once
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:850:45: error: ‘__cond’ was not declared in this scope
__gthread_cond_broadcast (__gthread_cond_t *__cond)
^~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:862:40: error: ‘__cond’ was not declared in this scope
__gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex)
^~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:862:40: note: suggested alternative: ‘lconv’
__gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex)
^~~~~~
lconv
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:862:48: error: ‘__gthread_mutex_t’ was not declared in this scope
__gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex)
^~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:868:27: error: ‘__gthread_cond_t’ was not declared in this scope
__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex,
^~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:868:27: note: suggested alternative: ‘__gthread_cond_wait’
__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex,
^~~~~~~~~~~~~~~~
__gthread_cond_wait
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:868:45: error: ‘__cond’ was not declared in this scope
__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex,
^~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:868:45: note: suggested alternative: ‘lconv’
__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex,
^~~~~~
lconv
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:869:6: error: expected primary-expression before ‘const’
const __gthread_time_t *__abs_timeout)
^~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:875:32: error: ‘__gthread_cond_t’ was not declared in this scope
__gthread_cond_wait_recursive (__gthread_cond_t *__cond,
^~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:875:32: note: suggested alternative: ‘__gthread_cond_wait’
__gthread_cond_wait_recursive (__gthread_cond_t *__cond,
^~~~~~~~~~~~~~~~
__gthread_cond_wait
/opt/fsl-imx-xwayland/4.14-sumo/sysroots/aarch64-poky-linux/usr/include/sys/types.h:48:9: error: ‘__ino_t’ does not name a type; did you mean ‘__int8_t’?
typedef __ino_t ino_t;
^~~~~~~
__int8_t
/opt/fsl-imx-xwayland/4.14-sumo/sysroots/aarch64-poky-linux/usr/include/sys/types.h:55:9: error: ‘__ino64_t’ does not name a type; did you mean ‘__int64_t’?
typedef __ino64_t ino64_t;
^~~~~~~~~
__int64_t
/opt/fsl-imx-xwayland/4.14-sumo/sysroots/aarch64-poky-linux/usr/include/sys/types.h:60:9: error: ‘__dev_t’ does not name a type; did you mean ‘lldiv_t’?
typedef __dev_t dev_t;
^~~~~~~
lldiv_t
/opt/fsl-imx-xwayland/4.14-sumo/sysroots/aarch64-poky-linux/usr/include/sys/types.h:70:9: error: ‘__mode_t’ does not name a type; did you mean ‘__size_t’?
typedef __mode_t mode_t;
^~~~~~~~
__size_t
/opt/fsl-imx-xwayland/4.14-sumo/sysroots/aarch64-poky-linux/usr/include/sys/types.h:75:9: error: ‘__nlink_t’ does not name a type; did you mean ‘__uint8_t’?
typedef __nlink_t nlink_t;
^~~~~~~~~
__uint8_t
/opt/fsl-imx-xwayland/4.14-sumo/sysroots/aarch64-poky-linux/usr/include/sys/select.h:64:24: note: suggested alternative: ‘FD_SETSIZE’
__fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
^~~~~~~~~~~~
FD_SETSIZE
/opt/fsl-imx-xwayland/4.14-sumo/sysroots/aarch64-poky-linux/usr/include/sys/types.h:246:9: error: ‘__blkcnt64_t’ does not name a type; did you mean ‘__uint64_t’?
typedef __blkcnt64_t blkcnt64_t; /* Type to count number of disk blocks. */
^~~~~~~~~~~~
__uint64_t
/opt/fsl-imx-xwayland/4.14-sumo/sysroots/aarch64-poky-linux/usr/include/bits/libio.h:337:9: error: ‘__ssize_t’ does not name a type; did you mean ‘__size_t’?
typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
^~~~~~~~~
__size_t
/opt/fsl-imx-xwayland/4.14-sumo/sysroots/aarch64-poky-linux/usr/include/bits/libio.h:362:9: error: ‘__io_read_fn’ does not name a type; did you mean ‘__io_seek_fn’?
typedef __io_read_fn cookie_read_function_t;
^~~~~~~~~~~~
__io_seek_fn
/opt/fsl-imx-xwayland/4.14-sumo/sysroots/aarch64-poky-linux/usr/include/bits/libio.h:466:8: error: ‘__ssize_t’ does not name a type; did you mean ‘__size_t’?
extern _IO_ssize_t _IO_padn (_IO_FILE *, int, _IO_ssize_t);
^
/opt/fsl-imx-xwayland/4.14-sumo/sysroots/aarch64-poky-linux/usr/include/bits/libio.h:469:8: error: ‘__off64_t’ does not name a type; did you mean ‘_IO_off64_t’?
extern _IO_off64_t _IO_seekoff (_IO_FILE *, _IO_off64_t, int, int);
^
/opt/fsl-imx-xwayland/4.14-sumo/sysroots/aarch64-poky-linux/usr/include/bits/libio.h:470:8: error: ‘__off64_t’ does not name a type; did you mean ‘_IO_off64_t’?
extern _IO_off64_t _IO_seekpos (_IO_FILE *, _IO_off64_t, int);
^
/usr/include/c++/7/bits/locale_classes.h:386:12: error: ‘__gthread_once_t’ does not name a type; did you mean ‘__gthread_once’?
static __gthread_once_t _S_once;
^~~~~~~~~~~~~~~~
__gthread_once
In file included from /usr/include/x86_64-linux-gnu/c++/7/bits/basic_file.h:40:0,
from /usr/include/c++/7/fstream:42,
from ../src/utility/readpng.cpp:9:
/usr/include/x86_64-linux-gnu/c++/7/bits/c++io.h:42:11: error: ‘__gthread_mutex_t’ does not name a type; did you mean ‘__gthread_mutex_lock’?
typedef __gthread_mutex_t __c_lock;
^~~~~~~~~~~~~~~~~
__gthread_mutex_lock
In file included from /usr/include/c++/7/fstream:42:0,
from ../src/utility/readpng.cpp:9:
/usr/include/x86_64-linux-gnu/c++/7/bits/basic_file.h:63:28: error: expected ‘)’ before ‘*’ token
__basic_file(__c_lock* __lock = 0) throw ();
^
/usr/include/x86_64-linux-gnu/c++/7/bits/basic_file.h:66:41: error: ‘__c_lock’ has not been declared
__basic_file(__basic_file&& __rv, __c_lock* __lock = 0) noexcept
^~~~~~~~
In file included from ../src/utility/readpng.cpp:9:0:
/usr/include/c++/7/fstream:107:7: error: ‘__c_lock’ does not name a type; did you mean ‘__c_locale’?
__c_lock _M_lock;
^~~~~~~~
__c_locale
In file included from /usr/include/c++/7/fstream:1081:0,
from ../src/utility/readpng.cpp:9:
/usr/include/c++/7/bits/fstream.tcc: In constructor ‘std::basic_filebuf<_CharT, _Traits>::basic_filebuf()’:
/usr/include/c++/7/bits/fstream.tcc:80:43: error: class ‘std::basic_filebuf<_CharT, _Traits>’ does not have any field named ‘_M_lock’
basic_filebuf() : __streambuf_type(), _M_lock(), _M_file(&_M_lock),
^~~~~~~
/usr/include/c++/7/bits/fstream.tcc:80:63: error: ‘_M_lock’ was not declared in this scope
basic_filebuf() : __streambuf_type(), _M_lock(), _M_file(&_M_lock),
^~~~~~~
/usr/include/c++/7/bits/fstream.tcc:80:63: note: suggested alternative: ‘_M_seek’
basic_filebuf() : __streambuf_type(), _M_lock(), _M_file(&_M_lock),
^~~~~~~
_M_seek
/usr/include/c++/7/bits/fstream.tcc: In constructor ‘std::basic_filebuf<_CharT, _Traits>::basic_filebuf(std::basic_filebuf<_CharT, _Traits>&&)’:
/usr/include/c++/7/bits/fstream.tcc:97:5: error: class ‘std::basic_filebuf<_CharT, _Traits>’ does not have any field named ‘_M_lock’
_M_lock(), _M_file(std::move(__rhs._M_file), &_M_lock),
^~~~~~~
/usr/include/c++/7/bits/fstream.tcc:97:51: error: ‘_M_lock’ was not declared in this scope
_M_lock(), _M_file(std::move(__rhs._M_file), &_M_lock),
^~~~~~~
/usr/include/c++/7/bits/fstream.tcc:97:51: note: suggested alternative: ‘_M_seek’
_M_lock(), _M_file(std::move(__rhs._M_file), &_M_lock),
^~~~~~~
_M_seek
make: *** [src/utility/readpng.o] Error 1
src/subdir.mk:18: recipe for target 'src/utility/readpng.o' failed
"make all" terminated with exit code 2. Build might be incomplete.
08:18:21 Build Failed. 5503 errors, 0 warnings. (took 35s.340ms)
Error log reduced to fit word count limits
Steps I have taken to solve the problem
Check all the environment variables in new Eclipse again
Look through the build message:
I found statements like "/usr/include/c++/7/...........", I could not understand why does the compiler path to my host directory instead of the tool chain directory' and I found error linked to glib
Then I went to my C/C++ Build >> Settings >> tool settings, I search through each and every includes but it does not path to my host directory
The only difference I found is that a different compiler is used, I have use the Linux Compiler in the Tool Chain Editor. but I do not see why it matters as I have compiled another cross compile project with other toolchain. They compiled successfully
Am at a loss of what could be the problem? need some direction
Thanks
The problem seem to be an old compiler I have..without removing the compiler settings...everything returned to normal it seem but if i removed it in favour of the Linux GCC...all hell break lose
Hello I am having issues getting my opencv setup and working with Eclipse and C++. I have my paths linked correctly and included libraries set up correctly, I have it working on my laptop so I am sure of this. When I try and build a project with just having #include as the only OpenCV code I get these errors.
UMat(UMat&& m);
^
/usr/local/include/opencv2/core/mat.hpp:2531:27: error: expected ‘,’ or ‘...’ before ‘&&’ token
UMat& operator = (UMat&& m);
^
In file included from /usr/local/include/opencv2/core/mat.hpp:3657:0,
from /usr/local/include/opencv2/core.hpp:59,
from ../src/HomeworkTwo.cpp:10:
/usr/local/include/opencv2/core/mat.inl.hpp: In member function ‘void cv::_InputArray::init(int, const void*, cv::Size)’:
/usr/local/include/opencv2/core/mat.inl.hpp:70:41: error: ambiguous overload for ‘operator=’ (operand types are ‘cv::Size {aka cv::Size_<int>}’ and ‘cv::Size {aka cv::Size_<int>}’)
{ flags = _flags; obj = (void*)_obj; sz = _sz; }
^
In file included from /usr/local/include/opencv2/core.hpp:58:0,
from ../src/HomeworkTwo.cpp:10:
/usr/local/include/opencv2/core/types.hpp:1707:13: note: candidate: cv::Size_<_Tp>& cv::Size_<_Tp>::operator=(const cv::Size_<_Tp>&) [with _Tp = int]
Size_<_Tp>& Size_<_Tp>::operator = (const Size_<_Tp>& sz)
^
/usr/local/include/opencv2/core/types.hpp:1714:13: note: candidate: cv::Size_<_Tp>& cv::Size_<_Tp>::operator=(cv::Size_<_Tp>) [with _Tp = int]
Size_<_Tp>& Size_<_Tp>::operator = (Size_<_Tp>&& sz) CV_NOEXCEPT
^
In file included from /usr/local/include/opencv2/core/mat.hpp:3657:0,
from /usr/local/include/opencv2/core.hpp:59,
from ../src/HomeworkTwo.cpp:10:
/usr/local/include/opencv2/core/mat.inl.hpp: At global scope:
/usr/local/include/opencv2/core/mat.inl.hpp:88:37: error: ‘array’ in namespace ‘std’ does not name a template type
_InputArray::_InputArray(const std::array<_Tp, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:88:42: error: expected ‘,’ or ‘...’ before ‘<’ token
_InputArray::_InputArray(const std::array<_Tp, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp: In constructor ‘cv::_InputArray::_InputArray(int)’:
/usr/local/include/opencv2/core/mat.inl.hpp:89:86: error: ‘arr’ was not declared in this scope
{ init(FIXED_TYPE + FIXED_SIZE + STD_ARRAY + traits::Type<_Tp>::value + ACCESS_READ, arr.data(), Size(1, _Nm)); }
^
/usr/local/include/opencv2/core/mat.inl.hpp: At global scope:
/usr/local/include/opencv2/core/mat.inl.hpp:92:37: error: ‘array’ in namespace ‘std’ does not name a template type
_InputArray::_InputArray(const std::array<Mat, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:92:42: error: expected ‘,’ or ‘...’ before ‘<’ token
_InputArray::_InputArray(const std::array<Mat, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp: In constructor ‘cv::_InputArray::_InputArray(int)’:
/usr/local/include/opencv2/core/mat.inl.hpp:93:37: error: ‘arr’ was not declared in this scope
{ init(STD_ARRAY_MAT + ACCESS_READ, arr.data(), Size(1, _Nm)); }
^
/usr/local/include/opencv2/core/mat.inl.hpp: At global scope:
/usr/local/include/opencv2/core/mat.inl.hpp:175:33: error: ‘cv::_OutputArray::_OutputArray’ declared as an ‘inline’ variable
_OutputArray::_OutputArray(std::array<_Tp, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:175:33: error: ‘int cv::_OutputArray::_OutputArray’ is not a static data member of ‘class cv::_OutputArray’
/usr/local/include/opencv2/core/mat.inl.hpp:175:33: error: template definition of non-template ‘int cv::_OutputArray::_OutputArray’
/usr/local/include/opencv2/core/mat.inl.hpp:175:28: error: ‘array’ is not a member of ‘std’
_OutputArray::_OutputArray(std::array<_Tp, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:175:42: error: expected primary-expression before ‘,’ token
_OutputArray::_OutputArray(std::array<_Tp, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:175:50: error: ‘arr’ was not declared in this scope
_OutputArray::_OutputArray(std::array<_Tp, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:179:33: error: ‘cv::_OutputArray::_OutputArray’ declared as an ‘inline’ variable
_OutputArray::_OutputArray(std::array<Mat, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:179:33: error: ‘int cv::_OutputArray::_OutputArray’ is not a static data member of ‘class cv::_OutputArray’
/usr/local/include/opencv2/core/mat.inl.hpp:179:33: error: template definition of non-template ‘int cv::_OutputArray::_OutputArray’
/usr/local/include/opencv2/core/mat.inl.hpp:179:28: error: ‘array’ is not a member of ‘std’
_OutputArray::_OutputArray(std::array<Mat, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:179:42: error: expected primary-expression before ‘,’ token
_OutputArray::_OutputArray(std::array<Mat, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:179:50: error: ‘arr’ was not declared in this scope
_OutputArray::_OutputArray(std::array<Mat, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:215:39: error: ‘array’ in namespace ‘std’ does not name a template type
_OutputArray::_OutputArray(const std::array<_Tp, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:215:44: error: expected ‘,’ or ‘...’ before ‘<’ token
_OutputArray::_OutputArray(const std::array<_Tp, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp: In constructor ‘cv::_OutputArray::_OutputArray(int)’:
/usr/local/include/opencv2/core/mat.inl.hpp:216:87: error: ‘arr’ was not declared in this scope
{ init(FIXED_TYPE + FIXED_SIZE + STD_ARRAY + traits::Type<_Tp>::value + ACCESS_WRITE, arr.data(), Size(1, _Nm)); }
^
/usr/local/include/opencv2/core/mat.inl.hpp: At global scope:
/usr/local/include/opencv2/core/mat.inl.hpp:219:39: error: ‘array’ in namespace ‘std’ does not name a template type
_OutputArray::_OutputArray(const std::array<Mat, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:219:44: error: expected ‘,’ or ‘...’ before ‘<’ token
_OutputArray::_OutputArray(const std::array<Mat, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp: In constructor ‘cv::_OutputArray::_OutputArray(int)’:
/usr/local/include/opencv2/core/mat.inl.hpp:220:51: error: ‘arr’ was not declared in this scope
{ init(FIXED_SIZE + STD_ARRAY_MAT + ACCESS_WRITE, arr.data(), Size(1, _Nm)); }
^
/usr/local/include/opencv2/core/mat.inl.hpp: At global scope:
/usr/local/include/opencv2/core/mat.inl.hpp:290:43: error: ‘cv::_InputOutputArray::_InputOutputArray’ declared as an ‘inline’ variable
_InputOutputArray::_InputOutputArray(std::array<_Tp, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:290:43: error: ‘int cv::_InputOutputArray::_InputOutputArray’ is not a static data member of ‘class cv::_InputOutputArray’
/usr/local/include/opencv2/core/mat.inl.hpp:290:43: error: template definition of non-template ‘int cv::_InputOutputArray::_InputOutputArray’
/usr/local/include/opencv2/core/mat.inl.hpp:290:38: error: ‘array’ is not a member of ‘std’
_InputOutputArray::_InputOutputArray(std::array<_Tp, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:290:52: error: expected primary-expression before ‘,’ token
_InputOutputArray::_InputOutputArray(std::array<_Tp, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:290:60: error: ‘arr’ was not declared in this scope
_InputOutputArray::_InputOutputArray(std::array<_Tp, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:294:43: error: ‘cv::_InputOutputArray::_InputOutputArray’ declared as an ‘inline’ variable
_InputOutputArray::_InputOutputArray(std::array<Mat, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:294:43: error: ‘int cv::_InputOutputArray::_InputOutputArray’ is not a static data member of ‘class cv::_InputOutputArray’
/usr/local/include/opencv2/core/mat.inl.hpp:294:43: error: template definition of non-template ‘int cv::_InputOutputArray::_InputOutputArray’
/usr/local/include/opencv2/core/mat.inl.hpp:294:38: error: ‘array’ is not a member of ‘std’
_InputOutputArray::_InputOutputArray(std::array<Mat, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:294:52: error: expected primary-expression before ‘,’ token
_InputOutputArray::_InputOutputArray(std::array<Mat, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:294:60: error: ‘arr’ was not declared in this scope
_InputOutputArray::_InputOutputArray(std::array<Mat, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:325:49: error: ‘array’ in namespace ‘std’ does not name a template type
_InputOutputArray::_InputOutputArray(const std::array<_Tp, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:325:54: error: expected ‘,’ or ‘...’ before ‘<’ token
_InputOutputArray::_InputOutputArray(const std::array<_Tp, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp: In constructor ‘cv::_InputOutputArray::_InputOutputArray(int)’:
/usr/local/include/opencv2/core/mat.inl.hpp:326:84: error: ‘arr’ was not declared in this scope
{ init(FIXED_TYPE + FIXED_SIZE + STD_ARRAY + traits::Type<_Tp>::value + ACCESS_RW, arr.data(), Size(1, _Nm)); }
^
/usr/local/include/opencv2/core/mat.inl.hpp: At global scope:
/usr/local/include/opencv2/core/mat.inl.hpp:329:49: error: ‘array’ in namespace ‘std’ does not name a template type
_InputOutputArray::_InputOutputArray(const std::array<Mat, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:329:54: error: expected ‘,’ or ‘...’ before ‘<’ token
_InputOutputArray::_InputOutputArray(const std::array<Mat, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp: In constructor ‘cv::_InputOutputArray::_InputOutputArray(int)’:
/usr/local/include/opencv2/core/mat.inl.hpp:330:48: error: ‘arr’ was not declared in this scope
{ init(FIXED_SIZE + STD_ARRAY_MAT + ACCESS_RW, arr.data(), Size(1, _Nm)); }
^
/usr/local/include/opencv2/core/mat.inl.hpp: At global scope:
/usr/local/include/opencv2/core/mat.inl.hpp:562:21: error: ‘initializer_list’ in namespace ‘std’ does not name a template type
Mat::Mat(const std::initializer_list<_Tp> list)
^
/usr/local/include/opencv2/core/mat.inl.hpp:562:37: error: expected ‘,’ or ‘...’ before ‘<’ token
Mat::Mat(const std::initializer_list<_Tp> list)
^
In file included from /usr/local/include/opencv2/core.hpp:54:0,
from ../src/HomeworkTwo.cpp:10:
/usr/local/include/opencv2/core/mat.inl.hpp: In constructor ‘cv::Mat::Mat(int)’:
/usr/local/include/opencv2/core/mat.inl.hpp:565:5: error: ‘list’ was not declared in this scope
CV_Assert(list.size() != 0);
^
In file included from /usr/local/include/opencv2/core/mat.hpp:3657:0,
from /usr/local/include/opencv2/core.hpp:59,
from ../src/HomeworkTwo.cpp:10:
/usr/local/include/opencv2/core/mat.inl.hpp:566:14: error: ‘list’ was not declared in this scope
Mat((int)list.size(), 1, traits::Type<_Tp>::value, (uchar*)list.begin()).copyTo(*this);
^
/usr/local/include/opencv2/core/mat.inl.hpp: At global scope:
/usr/local/include/opencv2/core/mat.inl.hpp:570:21: error: ‘initializer_list’ in namespace ‘std’ does not name a template type
Mat::Mat(const std::initializer_list<int> sizes, const std::initializer_list<_Tp> list)
^
/usr/local/include/opencv2/core/mat.inl.hpp:570:37: error: expected ‘,’ or ‘...’ before ‘<’ token
Mat::Mat(const std::initializer_list<int> sizes, const std::initializer_list<_Tp> list)
^
/usr/local/include/opencv2/core/mat.inl.hpp: In constructor ‘cv::Mat::Mat(int)’:
/usr/local/include/opencv2/core/mat.inl.hpp:574:14: error: ‘s’ does not name a type
for(auto s : sizes)
^
In file included from /usr/local/include/opencv2/core.hpp:54:0,
from ../src/HomeworkTwo.cpp:10:
/usr/local/include/opencv2/core/mat.inl.hpp:576:5: error: expected ‘;’ before ‘do’
CV_Assert(list.size() != 0);
^
/usr/local/include/opencv2/core/mat.inl.hpp:576:5: error: expected primary-expression before ‘do’
/usr/local/include/opencv2/core/mat.inl.hpp:576:5: error: expected ‘;’ before ‘do’
/usr/local/include/opencv2/core/mat.inl.hpp:576:5: error: expected primary-expression before ‘do’
/usr/local/include/opencv2/core/mat.inl.hpp:576:5: error: expected ‘)’ before ‘do’
/usr/local/include/opencv2/core/mat.inl.hpp:576:5: error: ‘list’ was not declared in this scope
CV_Assert(list.size() != 0);
^
/usr/local/include/opencv2/core/mat.inl.hpp:577:5: error: ‘list’ was not declared in this scope
CV_Assert(size_total == list.size());
^
In file included from /usr/local/include/opencv2/core/mat.hpp:3657:0,
from /usr/local/include/opencv2/core.hpp:59,
from ../src/HomeworkTwo.cpp:10:
/usr/local/include/opencv2/core/mat.inl.hpp:578:14: error: ‘sizes’ was not declared in this scope
Mat((int)sizes.size(), (int*)sizes.begin(), traits::Type<_Tp>::value, (uchar*)list.begin()).copyTo(*this);
^
/usr/local/include/opencv2/core/mat.inl.hpp:578:83: error: ‘list’ was not declared in this scope
Mat((int)sizes.size(), (int*)sizes.begin(), traits::Type<_Tp>::value, (uchar*)list.begin()).copyTo(*this);
^
/usr/local/include/opencv2/core/mat.inl.hpp: At global scope:
/usr/local/include/opencv2/core/mat.inl.hpp:582:21: error: ‘array’ in namespace ‘std’ does not name a template type
Mat::Mat(const std::array<_Tp, _Nm>& arr, bool copyData)
^
/usr/local/include/opencv2/core/mat.inl.hpp:582:26: error: expected ‘,’ or ‘...’ before ‘<’ token
Mat::Mat(const std::array<_Tp, _Nm>& arr, bool copyData)
^
/usr/local/include/opencv2/core/mat.inl.hpp: In constructor ‘cv::Mat::Mat(int)’:
/usr/local/include/opencv2/core/mat.inl.hpp:583:90: error: ‘arr’ was not declared in this scope
: flags(MAGIC_VAL | traits::Type<_Tp>::value | CV_MAT_CONT_FLAG), dims(2), rows((int)arr.size()),
^
/usr/local/include/opencv2/core/mat.inl.hpp:588:10: error: ‘copyData’ was not declared in this scope
if( !copyData )
^
/usr/local/include/opencv2/core/mat.inl.hpp: In member function ‘void cv::Mat::assignTo(cv::Mat&, int) const’:
/usr/local/include/opencv2/core/mat.inl.hpp:762:11: error: ambiguous overload for ‘operator=’ (operand types are ‘cv::Mat’ and ‘const cv::Mat’)
m = *this;
^
/usr/local/include/opencv2/core/mat.inl.hpp:686:6: note: candidate: cv::Mat& cv::Mat::operator=(const cv::Mat&)
Mat& Mat::operator = (const Mat& m)
^
In file included from /usr/local/include/opencv2/core.hpp:59:0,
from ../src/HomeworkTwo.cpp:10:
/usr/local/include/opencv2/core/mat.hpp:2060:10: note: candidate: cv::Mat& cv::Mat::operator=(cv::Mat)
Mat& operator = (Mat&& m);
^
In file included from /usr/local/include/opencv2/core/mat.hpp:3657:0,
from /usr/local/include/opencv2/core.hpp:59,
from ../src/HomeworkTwo.cpp:10:
/usr/local/include/opencv2/core/mat.inl.hpp: At global scope:
/usr/local/include/opencv2/core/mat.inl.hpp:1249:20: error: ‘array’ in namespace ‘std’ does not name a template type
Mat::operator std::array<_Tp, _Nm>() const
^
/usr/local/include/opencv2/core/mat.inl.hpp:1323:13: error: expected ‘,’ or ‘...’ before ‘&&’ token
Mat::Mat(Mat&& m)
^
/usr/local/include/opencv2/core/mat.inl.hpp:1323:1: error: prototype for ‘cv::Mat::Mat(cv::Mat)’ does not match any in class ‘cv::Mat’
Mat::Mat(Mat&& m)
^
In file included from /usr/local/include/opencv2/core.hpp:59:0,
from ../src/HomeworkTwo.cpp:10:
/usr/local/include/opencv2/core/mat.hpp:1021:14: error: candidates are: cv::Mat::Mat(const cv::cuda::GpuMat&)
explicit Mat(const cuda::GpuMat& m);
^
/usr/local/include/opencv2/core/mat.hpp:1018:37: error: template<class _Tp> cv::Mat::Mat(const cv::MatCommaInitializer_<_Tp>&)
template<typename _Tp> explicit Mat(const MatCommaInitializer_<_Tp>& commaInitializer);
^
/usr/local/include/opencv2/core/mat.hpp:1014:37: error: template<class _Tp> cv::Mat::Mat(const cv::Point3_<_Tp>&, bool)
template<typename _Tp> explicit Mat(const Point3_<_Tp>& pt, bool copyData=true);
^
/usr/local/include/opencv2/core/mat.hpp:1010:37: error: template<class _Tp> cv::Mat::Mat(const cv::Point_<_Tp>&, bool)
template<typename _Tp> explicit Mat(const Point_<_Tp>& pt, bool copyData=true);
^
/usr/local/include/opencv2/core/mat.hpp:1006:51: error: template<class _Tp, int m, int n> cv::Mat::Mat(const cv::Matx<_Tp, m, n>&, bool)
template<typename _Tp, int m, int n> explicit Mat(const Matx<_Tp, m, n>& mtx, bool copyData=true);
^
/usr/local/include/opencv2/core/mat.hpp:1002:44: error: template<class _Tp, int n> cv::Mat::Mat(const cv::Vec<_Tp, m>&, bool)
template<typename _Tp, int n> explicit Mat(const Vec<_Tp, n>& vec, bool copyData=true);
^
/usr/local/include/opencv2/core/mat.hpp:997:49: error: template<class _Tp, long unsigned int _Nm> cv::Mat::Mat(int)
template<typename _Tp, size_t _Nm> explicit Mat(const std::array<_Tp, _Nm>& arr, bool copyData=false);
^
/usr/local/include/opencv2/core/mat.hpp:992:37: error: template<class _Tp> cv::Mat::Mat(int)
template<typename _Tp> explicit Mat(const std::initializer_list<int> sizes, const std::initializer_list<_Tp> list);
^
/usr/local/include/opencv2/core/mat.hpp:988:14: error: template<class _Tp, class> cv::Mat::Mat(int)
explicit Mat(const std::initializer_list<_Tp> list);
^
/usr/local/include/opencv2/core/mat.hpp:983:37: error: template<class _Tp> cv::Mat::Mat(const std::vector<_Tp>&, bool)
template<typename _Tp> explicit Mat(const std::vector<_Tp>& vec, bool copyData=false);
^
/usr/local/include/opencv2/core/mat.hpp:965:5: error: cv::Mat::Mat(const cv::Mat&, const std::vector<cv::Range>&)
Mat(const Mat& m, const std::vector<Range>& ranges);
^
/usr/local/include/opencv2/core/mat.hpp:955:5: error: cv::Mat::Mat(const cv::Mat&, const cv::Range*)
Mat(const Mat& m, const Range* ranges);
^
/usr/local/include/opencv2/core/mat.hpp:945:5: error: cv::Mat::Mat(const cv::Mat&, const Rect&)
Mat(const Mat& m, const Rect& roi);
^
/usr/local/include/opencv2/core/mat.hpp:935:5: error: cv::Mat::Mat(const cv::Mat&, const cv::Range&, const cv::Range&)
Mat(const Mat& m, const Range& rowRange, const Range& colRange=Range::all());
^
/usr/local/include/opencv2/core/mat.hpp:923:5: error: cv::Mat::Mat(const std::vector<int>&, int, void*, const size_t*)
Mat(const std::vector<int>& sizes, int type, void* data, const size_t* steps=0);
^
/usr/local/include/opencv2/core/mat.hpp:909:5: error: cv::Mat::Mat(int, const int*, int, void*, const size_t*)
Mat(int ndims, const int* sizes, int type, void* data, const size_t* steps=0);
^
In file included from /usr/local/include/opencv2/core/mat.hpp:3657:0,
from /usr/local/include/opencv2/core.hpp:59,
from ../src/HomeworkTwo.cpp:10:
/usr/local/include/opencv2/core/mat.inl.hpp:515:1: error: cv::Mat::Mat(cv::Size, int, void*, size_t)
Mat::Mat(Size _sz, int _type, void* _data, size_t _step)
^
/usr/local/include/opencv2/core/mat.inl.hpp:486:1: error: cv::Mat::Mat(int, int, int, void*, size_t)
Mat::Mat(int _rows, int _cols, int _type, void* _data, size_t _step)
^
/usr/local/include/opencv2/core/mat.inl.hpp:467:1: error: cv::Mat::Mat(const cv::Mat&)
Mat::Mat(const Mat& m)
^
/usr/local/include/opencv2/core/mat.inl.hpp:458:1: error: cv::Mat::Mat(const std::vector<int>&, int, const Scalar&)
Mat::Mat(const std::vector<int>& _sz, int _type, const Scalar& _s)
^
/usr/local/include/opencv2/core/mat.inl.hpp:441:1: error: cv::Mat::Mat(int, const int*, int, const Scalar&)
Mat::Mat(int _dims, const int* _sz, int _type, const Scalar& _s)
^
/usr/local/include/opencv2/core/mat.inl.hpp:450:1: error: cv::Mat::Mat(const std::vector<int>&, int)
Mat::Mat(const std::vector<int>& _sz, int _type)
^
/usr/local/include/opencv2/core/mat.inl.hpp:433:1: error: cv::Mat::Mat(int, const int*, int)
Mat::Mat(int _dims, const int* _sz, int _type)
^
/usr/local/include/opencv2/core/mat.inl.hpp:424:1: error: cv::Mat::Mat(cv::Size, int, const Scalar&)
Mat::Mat(Size _sz, int _type, const Scalar& _s)
^
/usr/local/include/opencv2/core/mat.inl.hpp:407:1: error: cv::Mat::Mat(int, int, int, const Scalar&)
Mat::Mat(int _rows, int _cols, int _type, const Scalar& _s)
^
/usr/local/include/opencv2/core/mat.inl.hpp:416:1: error: cv::Mat::Mat(cv::Size, int)
Mat::Mat(Size _sz, int _type)
^
/usr/local/include/opencv2/core/mat.inl.hpp:399:1: error: cv::Mat::Mat(int, int, int)
Mat::Mat(int _rows, int _cols, int _type)
^
/usr/local/include/opencv2/core/mat.inl.hpp:393:1: error: cv::Mat::Mat()
Mat::Mat()
^
/usr/local/include/opencv2/core/mat.inl.hpp:1348:26: error: expected ‘,’ or ‘...’ before ‘&&’ token
Mat& Mat::operator = (Mat&& m)
^
/usr/local/include/opencv2/core/mat.inl.hpp: In member function ‘cv::Mat& cv::Mat::operator=(cv::Mat)’:
/usr/local/include/opencv2/core/mat.inl.hpp:1350:18: error: ‘m’ was not declared in this scope
if (this == &m)
^
/usr/local/include/opencv2/core/mat.inl.hpp:1354:13: error: ‘m’ was not declared in this scope
flags = m.flags; dims = m.dims; rows = m.rows; cols = m.cols; data = m.data;
^
/usr/local/include/opencv2/core/mat.inl.hpp: At global scope:
/usr/local/include/opencv2/core/mat.inl.hpp:1628:22: error: ‘cv::Mat_<_Tp>::Mat_’ declared as an ‘inline’ variable
Mat_<_Tp>::Mat_(std::initializer_list<_Tp> list)
^
/usr/local/include/opencv2/core/mat.inl.hpp:1628:22: error: ‘int cv::Mat_<_Tp>::Mat_’ is not a static data member of ‘class cv::Mat_<_Tp>’
/usr/local/include/opencv2/core/mat.inl.hpp:1628:22: error: template definition of non-template ‘int cv::Mat_<_Tp>::Mat_’
/usr/local/include/opencv2/core/mat.inl.hpp:1628:17: error: ‘initializer_list’ is not a member of ‘std’
Mat_<_Tp>::Mat_(std::initializer_list<_Tp> list)
^
/usr/local/include/opencv2/core/mat.inl.hpp:1628:42: error: expected primary-expression before ‘>’ token
Mat_<_Tp>::Mat_(std::initializer_list<_Tp> list)
^
/usr/local/include/opencv2/core/mat.inl.hpp:1628:44: error: ‘list’ was not declared in this scope
Mat_<_Tp>::Mat_(std::initializer_list<_Tp> list)
^
/usr/local/include/opencv2/core/mat.inl.hpp:1633:28: error: ‘initializer_list’ in namespace ‘std’ does not name a template type
Mat_<_Tp>::Mat_(const std::initializer_list<int> sizes, std::initializer_list<_Tp> list)
I would like to use the intersect_segments method of the Boost segment utils, which can be found here: http://www.boost.org/doc/libs/1_59_0/libs/polygon/doc/gtl_segment_concept.htm
I also have followed and implemented the code that maps the Point and Segment structs to the Boost.Polygon concepts: http://www.boost.org/doc/libs/1_59_0/libs/polygon/doc/voronoi_basic_tutorial.htm
However, when I include <boost/polygon/segment_utils.hpp> I get many errors during compiling:
In file included from /usr/include/boost/polygon/segment_utils.hpp:16:0,
from test.cpp:17:
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:17:49: error: expected template-name before '<' token
class line_intersection : public scanline_base<Unit> {
^
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:17:49: error: expected '{' before '<' token
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:17:49: error: expected unqualified-id before '<' token
In file included from /usr/include/boost/polygon/segment_utils.hpp:16:0,
from test.cpp:17:
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:947:40: error: expected template-name before '<' token
class scanline : public scanline_base<Unit> {
^
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:947:40: error: expected '{' before '<' token
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:947:40: error: expected unqualified-id before '<' token
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:1472:22: error: expected nested-name-specifier before 'scanline_base'
typedef typename scanline_base<Unit>::half_edge half_edge;
^
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:1472:22: error: expected ';' at end of member declaration
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:1472:35: error: expected unqualified-id before '<' token
typedef typename scanline_base<Unit>::half_edge half_edge;
^
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:1475:48: error: 'half_edge' does not name a type
void operator()(result_type& result, const half_edge& edge, const key_type& left, const key_type& right) {
^
/usr/include/boost/polygon/detail/scan_arbitrary.hpp: In member function 'void boost::polygon::merge_output_functor<Unit>::operator()(result_type&, const int&, const key_type&, const key_type&)':
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:1476:26: error: 'half_edge' was not declared in this scope
typename std::pair<half_edge, int> elem;
^
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:1476:40: error: template argument 1 is invalid
typename std::pair<half_edge, int> elem;
^
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:1476:42: error: 'elem' in namespace 'std' does not name a type
typename std::pair<half_edge, int> elem;
^
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:1477:7: error: 'elem' was not declared in this scope
elem.first = edge;
^
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:1479:15: error: request for member 'second' in 'edge', which is of non-class type 'const int'
if(edge.second < edge.first) elem.second *= -1;
^
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:1479:29: error: request for member 'first' in 'edge', which is of non-class type 'const int'
if(edge.second < edge.first) elem.second *= -1;
^
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:1480:10: error: 'boost::polygon::merge_output_functor<Unit>::scanline_base {aka int}' is not a template
if(scanline_base<Unit>::is_vertical(edge)) elem.second *= -1;
^
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:1480:10: error: 'scanline_base' is not a class, namespace, or enumeration
/usr/include/boost/polygon/detail/scan_arbitrary.hpp: At global scope:
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:1491:46: error: expected template-name before '<' token
class property_merge : public scanline_base<Unit> {
^
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:1491:46: error: expected '{' before '<' token
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:1491:46: error: expected unqualified-id before '<' token
In file included from /usr/include/boost/polygon/segment_utils.hpp:16:0,
from test.cpp:17:
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:2490:52: error: expected template-name before '<' token
class arbitrary_boolean_op : public scanline_base<Unit> {
^
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:2490:52: error: expected '{' before '<' token
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:2490:52: error: expected unqualified-id before '<' token
/usr/include/boost/polygon/detail/scan_arbitrary.hpp: In function 'bool boost::polygon::test_arbitrary_boolean_op(stream_type&)':
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:2653:5: error: 'polygon_set_data' was not declared in this scope
polygon_set_data<Unit> psd;
^
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:2653:26: error: expected primary-expression before '>' token
polygon_set_data<Unit> psd;
^
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:2653:28: error: 'psd' was not declared in this scope
polygon_set_data<Unit> psd;
^
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:2657:26: error: expected primary-expression before '>' token
polygon_set_data<Unit> psd2;
^
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:2657:28: error: 'psd2' was not declared in this scope
polygon_set_data<Unit> psd2;
^
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:2660:17: error: 'polygon_data' was not declared in this scope
std::vector<polygon_data<Unit> > pv;
^
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:2660:34: error: template argument 1 is invalid
std::vector<polygon_data<Unit> > pv;
^
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:2660:34: error: template argument 2 is invalid
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:2660:36: error: expected unqualified-id before '>' token
std::vector<polygon_data<Unit> > pv;
^
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:2661:5: error: 'pv' was not declared in this scope
pv.clear();
^
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:2663:26: error: expected primary-expression before '>' token
polygon_set_data<Unit> psd3;
^
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:2663:28: error: 'psd3' was not declared in this scope
polygon_set_data<Unit> psd3;
^
/usr/include/boost/polygon/detail/scan_arbitrary.hpp: At global scope:
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:2710:65: error: expected template-name before '<' token
class arbitrary_connectivity_extraction : public scanline_base<Unit> {
^
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:2710:65: error: expected '{' before '<' token
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:2710:65: error: expected unqualified-id before '<' token
In file included from test.cpp:17:0:
/usr/include/boost/polygon/segment_utils.hpp: In function 'typename boost::enable_if<typename boost::polygon::gtl_and<typename boost::polygon::gtl_if<typename boost::polygon::is_segment_concept<typename boost::polygon::geometry_concept<typename std::iterator_traits<_Iterator1>::value_type>::type>::type>::type, typename boost::polygon::gtl_if<typename boost::polygon::is_segment_concept<typename boost::polygon::geometry_concept<GeometryType>::type>::type>::type>::type, void>::type boost::polygon::intersect_segments(std::vector<std::pair<long unsigned int, Segment> >&, SegmentIterator, SegmentIterator)':
/usr/include/boost/polygon/segment_utils.hpp:46:20: error: expected nested-name-specifier before 'scanline_base'
typedef typename scanline_base<Unit>::Point Point;
^
/usr/include/boost/polygon/segment_utils.hpp:46:33: error: expected initializer before '<' token
typedef typename scanline_base<Unit>::Point Point;
^
/usr/include/boost/polygon/segment_utils.hpp:47:20: error: expected nested-name-specifier before 'scanline_base'
typedef typename scanline_base<Unit>::half_edge half_edge;
^
/usr/include/boost/polygon/segment_utils.hpp:47:33: error: expected initializer before '<' token
typedef typename scanline_base<Unit>::half_edge half_edge;
^
/usr/include/boost/polygon/segment_utils.hpp:49:25: error: 'half_edge' was not declared in this scope
std::vector<std::pair<half_edge, segment_id> > half_edges;
^
/usr/include/boost/polygon/segment_utils.hpp:49:46: error: template argument 1 is invalid
std::vector<std::pair<half_edge, segment_id> > half_edges;
^
/usr/include/boost/polygon/segment_utils.hpp:49:48: error: template argument 1 is invalid
std::vector<std::pair<half_edge, segment_id> > half_edges;
^
/usr/include/boost/polygon/segment_utils.hpp:49:48: error: template argument 2 is invalid
/usr/include/boost/polygon/segment_utils.hpp:50:25: error: the value of 'half_edge' is not usable in a constant expression
std::vector<std::pair<half_edge, segment_id> > half_edges_out;
^
/usr/include/boost/polygon/segment_utils.hpp:49:25: note: 'half_edge' was not declared 'constexpr'
std::vector<std::pair<half_edge, segment_id> > half_edges;
^
/usr/include/boost/polygon/segment_utils.hpp:50:46: error: type/value mismatch at argument 1 in template parameter list for 'template<class _T1, class _T2> struct std::pair'
std::vector<std::pair<half_edge, segment_id> > half_edges_out;
^
/usr/include/boost/polygon/segment_utils.hpp:50:46: note: expected a type, got 'half_edge'
/usr/include/boost/polygon/segment_utils.hpp:50:48: error: template argument 1 is invalid
std::vector<std::pair<half_edge, segment_id> > half_edges_out;
^
/usr/include/boost/polygon/segment_utils.hpp:50:48: error: template argument 2 is invalid
/usr/include/boost/polygon/segment_utils.hpp:52:14: error: request for member 'reserve' in 'half_edges', which is of non-class type 'int'
half_edges.reserve(std::distance(first, last));
^
/usr/include/boost/polygon/segment_utils.hpp:57:16: error: request for member 'push_back' in 'half_edges', which is of non-class type 'int'
half_edges.push_back(std::make_pair(half_edge(l, h), id_in++));
^
/usr/include/boost/polygon/segment_utils.hpp:59:18: error: request for member 'reserve' in 'half_edges_out', which is of non-class type 'int'
half_edges_out.reserve(half_edges.size());
^
/usr/include/boost/polygon/segment_utils.hpp:59:37: error: request for member 'size' in 'half_edges', which is of non-class type 'int'
half_edges_out.reserve(half_edges.size());
^
/usr/include/boost/polygon/segment_utils.hpp:61:18: error: request for member 'size' in 'half_edges', which is of non-class type 'int'
if (half_edges.size() != 0) {
^
/usr/include/boost/polygon/segment_utils.hpp:63:36: error: request for member 'begin' in 'half_edges', which is of non-class type 'int'
half_edges_out, half_edges.begin(), half_edges.end());
^
/usr/include/boost/polygon/segment_utils.hpp:63:56: error: request for member 'end' in 'half_edges', which is of non-class type 'int'
half_edges_out, half_edges.begin(), half_edges.end());
^
/usr/include/boost/polygon/segment_utils.hpp:66:49: error: request for member 'size' in 'half_edges_out', which is of non-class type 'int'
result.reserve(result.size() + half_edges_out.size());
^
/usr/include/boost/polygon/segment_utils.hpp:67:46: error: request for member 'size' in 'half_edges_out', which is of non-class type 'int'
for (std::size_t i = 0; i < half_edges_out.size(); ++i) {
^
/usr/include/boost/polygon/segment_utils.hpp:68:52: error: invalid types 'int[std::size_t {aka long unsigned int}]' for array subscript
std::size_t id = (std::size_t)(half_edges_out[i].second);
^
/usr/include/boost/polygon/segment_utils.hpp:69:31: error: invalid types 'int[std::size_t {aka long unsigned int}]' for array subscript
Point l = half_edges_out[i].first.first;
^
/usr/include/boost/polygon/segment_utils.hpp:70:31: error: invalid types 'int[std::size_t {aka long unsigned int}]' for array subscript
Point h = half_edges_out[i].first.second;
^
/usr/include/boost/polygon/segment_utils.hpp: In function 'typename boost::enable_if<typename boost::polygon::gtl_and<typename boost::polygon::gtl_if<typename boost::polygon::is_segment_concept<typename boost::polygon::geometry_concept<typename std::iterator_traits<_Iterator1>::value_type>::type>::type>::type, typename boost::polygon::gtl_if<typename boost::polygon::is_segment_concept<typename boost::polygon::geometry_concept<typename SegmentContainer::value_type>::type>::type>::type>::type, void>::type boost::polygon::intersect_segments(SegmentContainer&, SegmentIterator, SegmentIterator)':
/usr/include/boost/polygon/segment_utils.hpp:101:20: error: expected nested-name-specifier before 'scanline_base'
typedef typename scanline_base<Unit>::Point Point;
^
/usr/include/boost/polygon/segment_utils.hpp:101:33: error: expected initializer before '<' token
typedef typename scanline_base<Unit>::Point Point;
^
/usr/include/boost/polygon/segment_utils.hpp:102:20: error: expected nested-name-specifier before 'scanline_base'
typedef typename scanline_base<Unit>::half_edge half_edge;
^
/usr/include/boost/polygon/segment_utils.hpp:102:33: error: expected initializer before '<' token
typedef typename scanline_base<Unit>::half_edge half_edge;
^
/usr/include/boost/polygon/segment_utils.hpp:104:25: error: 'half_edge' was not declared in this scope
std::vector<std::pair<half_edge, segment_id> > half_edges;
^
/usr/include/boost/polygon/segment_utils.hpp:104:46: error: template argument 1 is invalid
std::vector<std::pair<half_edge, segment_id> > half_edges;
^
/usr/include/boost/polygon/segment_utils.hpp:104:48: error: template argument 1 is invalid
std::vector<std::pair<half_edge, segment_id> > half_edges;
^
/usr/include/boost/polygon/segment_utils.hpp:104:48: error: template argument 2 is invalid
/usr/include/boost/polygon/segment_utils.hpp:105:25: error: the value of 'half_edge' is not usable in a constant expression
std::vector<std::pair<half_edge, segment_id> > half_edges_out;
^
/usr/include/boost/polygon/segment_utils.hpp:104:25: note: 'half_edge' was not declared 'constexpr'
std::vector<std::pair<half_edge, segment_id> > half_edges;
^
/usr/include/boost/polygon/segment_utils.hpp:105:46: error: type/value mismatch at argument 1 in template parameter list for 'template<class _T1, class _T2> struct std::pair'
std::vector<std::pair<half_edge, segment_id> > half_edges_out;
^
/usr/include/boost/polygon/segment_utils.hpp:105:46: note: expected a type, got 'half_edge'
/usr/include/boost/polygon/segment_utils.hpp:105:48: error: template argument 1 is invalid
std::vector<std::pair<half_edge, segment_id> > half_edges_out;
^
/usr/include/boost/polygon/segment_utils.hpp:105:48: error: template argument 2 is invalid
/usr/include/boost/polygon/segment_utils.hpp:107:14: error: request for member 'reserve' in 'half_edges', which is of non-class type 'int'
half_edges.reserve(std::distance(first, last));
^
/usr/include/boost/polygon/segment_utils.hpp:112:16: error: request for member 'push_back' in 'half_edges', which is of non-class type 'int'
half_edges.push_back(std::make_pair(half_edge(l, h), id_in++));
^
/usr/include/boost/polygon/segment_utils.hpp:114:18: error: request for member 'reserve' in 'half_edges_out', which is of non-class type 'int'
half_edges_out.reserve(half_edges.size());
^
/usr/include/boost/polygon/segment_utils.hpp:114:37: error: request for member 'size' in 'half_edges', which is of non-class type 'int'
half_edges_out.reserve(half_edges.size());
^
/usr/include/boost/polygon/segment_utils.hpp:116:18: error: request for member 'size' in 'half_edges', which is of non-class type 'int'
if (half_edges.size() != 0) {
^
/usr/include/boost/polygon/segment_utils.hpp:118:36: error: request for member 'begin' in 'half_edges', which is of non-class type 'int'
half_edges_out, half_edges.begin(), half_edges.end());
^
/usr/include/boost/polygon/segment_utils.hpp:118:56: error: request for member 'end' in 'half_edges', which is of non-class type 'int'
half_edges_out, half_edges.begin(), half_edges.end());
^
/usr/include/boost/polygon/segment_utils.hpp:121:49: error: request for member 'size' in 'half_edges_out', which is of non-class type 'int'
result.reserve(result.size() + half_edges_out.size());
^
/usr/include/boost/polygon/segment_utils.hpp:122:46: error: request for member 'size' in 'half_edges_out', which is of non-class type 'int'
for (std::size_t i = 0; i < half_edges_out.size(); ++i) {
^
/usr/include/boost/polygon/segment_utils.hpp:123:31: error: invalid types 'int[std::size_t {aka long unsigned int}]' for array subscript
Point l = half_edges_out[i].first.first;
^
/usr/include/boost/polygon/segment_utils.hpp:124:31: error: invalid types 'int[std::size_t {aka long unsigned int}]' for array subscript
Point h = half_edges_out[i].first.second;
Could this mean that I need to implement the Unit concept as well? If so, how is that done?
Edit: My code is the same as this code: http://www.boost.org/doc/libs/1_61_0/libs/polygon/example/voronoi_basic_tutorial.cpp but then with #include <boost/polygon/segment_utils.hpp> added.
You just need to #include <boost/polygon/polygon.hpp> before including <boost/polygon/segment_utils.hpp>.
/usr/include/boost/polygon/detail/scan_arbitrary.hpp:17:49: error: expected template-name before '<' token
class line_intersection : public scanline_base<Unit> {
^
This error suggests you've defined line_intersection as a macro, because it's complaining about a < token where there isn't one in the source.
But since you haven't shown any code, we can't tell.
Edit after updated question:
This seems to be a a Boost bug, it can be reproduced with a file consisting of nothing but:
#include <boost/polygon/segment_utils.hpp>
I am trying to replicate tensorflow serving examples from https://tensorflow.github.io/serving/serving_advanced.html
But I get following error. It is possibly Tensorflow library error. Any help will be greatly appreciated.
:
~/serving$ bazel build //tensorflow_serving/example:mnist_inference_2
INFO: Found 1 target...
ERROR: /home/ubuntu/serving/tensorflow_serving/session_bundle/BUILD:125:1: C++ compilation of rule '//tensorflow_serving/session_bundle:session_bundle' failed: gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wl,-z,-relro,-z,now -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++0x' -iquote . ... (remaining 103 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
In file included from ./tensorflow_serving/session_bundle/session_bundle.h:30:0,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
./tensorflow_serving/session_bundle/signature.h:40:22: error: 'Signatures' has not been declared
Signatures* signatures);
^
./tensorflow_serving/session_bundle/signature.h:43:28: error: 'Signatures' does not name a type
Status SetSignatures(const Signatures& signatures,
^
./tensorflow_serving/session_bundle/signature.h:43:40: error: ISO C++ forbids declaration of 'signatures' with no type [-fpermissive]
Status SetSignatures(const Signatures& signatures,
^
./tensorflow_serving/session_bundle/signature.h:51:5: error: 'ClassificationSignature' has not been declared
ClassificationSignature* signature);
^
./tensorflow_serving/session_bundle/signature.h:58:5: error: 'ClassificationSignature' has not been declared
ClassificationSignature* signature);
^
./tensorflow_serving/session_bundle/signature.h:64:31: error: 'RegressionSignature' has not been declared
RegressionSignature* signature);
^
./tensorflow_serving/session_bundle/signature.h:73:32: error: 'ClassificationSignature' does not name a type
Status RunClassification(const ClassificationSignature& signature,
^
./tensorflow_serving/session_bundle/signature.h:73:57: error: ISO C++ forbids declaration of 'signature' with no type [-fpermissive]
Status RunClassification(const ClassificationSignature& signature,
^
./tensorflow_serving/session_bundle/signature.h:83:28: error: 'RegressionSignature' does not name a type
Status RunRegression(const RegressionSignature& signature, const Tensor& input,
^
./tensorflow_serving/session_bundle/signature.h:83:49: error: ISO C++ forbids declaration of 'signature' with no type [-fpermissive]
Status RunRegression(const RegressionSignature& signature, const Tensor& input,
^
./tensorflow_serving/session_bundle/signature.h:90:28: error: 'GenericSignature' has not been declared
GenericSignature* signature);
^
./tensorflow_serving/session_bundle/signature.h:94:28: error: 'Signature' has not been declared
Signature* default_signature);
^
./tensorflow_serving/session_bundle/signature.h:100:26: error: 'Signature' has not been declared
Signature* default_signature);
^
./tensorflow_serving/session_bundle/signature.h:106:32: error: 'GenericSignature' does not name a type
Status BindGenericInputs(const GenericSignature& signature,
^
./tensorflow_serving/session_bundle/signature.h:106:50: error: ISO C++ forbids declaration of 'signature' with no type [-fpermissive]
Status BindGenericInputs(const GenericSignature& signature,
^
./tensorflow_serving/session_bundle/signature.h:117:31: error: 'GenericSignature' does not name a type
Status BindGenericNames(const GenericSignature& signature,
^
./tensorflow_serving/session_bundle/signature.h:117:49: error: ISO C++ forbids declaration of 'signature' with no type [-fpermissive]
Status BindGenericNames(const GenericSignature& signature,
^
tensorflow_serving/session_bundle/session_bundle.cc:68:49: error: 'AssetFile' was not declared in this scope
const std::vector<AssetFile>& asset_files,
^
tensorflow_serving/session_bundle/session_bundle.cc:68:49: note: suggested alternative:
In file included from ./tensorflow_serving/session_bundle/manifest.pb.h:19:0,
from ./tensorflow_serving/session_bundle/session_bundle.h:29,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
bazel-out/local-fastbuild/genfiles/external/org_tensorflow/tensorflow/contrib/session_bundle/manifest.pb.h:237:7: note: 'tensorflow::contrib::AssetFile'
class AssetFile : public ::google::protobuf::Message {
^
tensorflow_serving/session_bundle/session_bundle.cc:68:58: error: template argument 1 is invalid
const std::vector<AssetFile>& asset_files,
^
tensorflow_serving/session_bundle/session_bundle.cc:68:58: error: template argument 2 is invalid
tensorflow_serving/session_bundle/session_bundle.cc: In function 'void tensorflow::serving::{anonymous}::AddAssetsTensorsToInputs(tensorflow::StringPiece, const int&, std::vector<std::pair<std::basic_string<char>, tensorflow::Tensor> >*)':
tensorflow_serving/session_bundle/session_bundle.cc:70:20: error: request for member 'empty' in 'asset_files', which is of non-class type 'const int'
if (!asset_files.empty()) {
^
tensorflow_serving/session_bundle/session_bundle.cc:71:24: error: no matching function for call to 'begin(const int&)'
for (auto& asset : asset_files) {
^
tensorflow_serving/session_bundle/session_bundle.cc:71:24: note: candidates are:
In file included from /usr/include/c++/4.8/string:51:0,
from /usr/include/c++/4.8/stdexcept:39,
from /usr/include/c++/4.8/array:38,
from /usr/include/c++/4.8/tuple:39,
from /usr/include/c++/4.8/functional:55,
from /usr/include/c++/4.8/memory:79,
from ./tensorflow_serving/session_bundle/session_bundle.h:21,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
/usr/include/c++/4.8/bits/range_access.h:87:5: note: template<class _Tp, long unsigned int _Nm> _Tp* std::begin(_Tp (&)[_Nm])
begin(_Tp (&__arr)[_Nm])
^
/usr/include/c++/4.8/bits/range_access.h:87:5: note: template argument deduction/substitution failed:
tensorflow_serving/session_bundle/session_bundle.cc:71:24: note: mismatched types '_Tp [_Nm]' and 'const int'
for (auto& asset : asset_files) {
^
In file included from /usr/include/c++/4.8/string:51:0,
from /usr/include/c++/4.8/stdexcept:39,
from /usr/include/c++/4.8/array:38,
from /usr/include/c++/4.8/tuple:39,
from /usr/include/c++/4.8/functional:55,
from /usr/include/c++/4.8/memory:79,
from ./tensorflow_serving/session_bundle/session_bundle.h:21,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
/usr/include/c++/4.8/bits/range_access.h:58:5: note: template<class _Container> decltype (__cont.begin()) std::begin(const _Container&)
begin(const _Container& __cont) -> decltype(__cont.begin())
^
/usr/include/c++/4.8/bits/range_access.h:58:5: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/bits/range_access.h: In substitution of 'template<class _Container> decltype (__cont.begin()) std::begin(const _Container&) [with _Container = int]':
tensorflow_serving/session_bundle/session_bundle.cc:71:24: required from here
/usr/include/c++/4.8/bits/range_access.h:58:5: error: request for member 'begin' in '__cont', which is of non-class type 'const int'
/usr/include/c++/4.8/bits/range_access.h:48:5: note: template<class _Container> decltype (__cont.begin()) std::begin(_Container&)
begin(_Container& __cont) -> decltype(__cont.begin())
^
/usr/include/c++/4.8/bits/range_access.h:48:5: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/bits/range_access.h: In substitution of 'template<class _Container> decltype (__cont.begin()) std::begin(_Container&) [with _Container = const int]':
tensorflow_serving/session_bundle/session_bundle.cc:71:24: required from here
/usr/include/c++/4.8/bits/range_access.h:48:5: error: request for member 'begin' in '__cont', which is of non-class type 'const int'
In file included from /usr/include/c++/4.8/utility:74:0,
from /usr/include/c++/4.8/tuple:38,
from /usr/include/c++/4.8/functional:55,
from /usr/include/c++/4.8/memory:79,
from ./tensorflow_serving/session_bundle/session_bundle.h:21,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
/usr/include/c++/4.8/initializer_list:89:5: note: template<class _Tp> constexpr const _Tp* std::begin(std::initializer_list<_Tp>)
begin(initializer_list<_Tp> __ils) noexcept
^
/usr/include/c++/4.8/initializer_list:89:5: note: template argument deduction/substitution failed:
tensorflow_serving/session_bundle/session_bundle.cc:71:24: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
for (auto& asset : asset_files) {
^
tensorflow_serving/session_bundle/session_bundle.cc:71:24: error: no matching function for call to 'end(const int&)'
tensorflow_serving/session_bundle/session_bundle.cc:71:24: note: candidates are:
In file included from /usr/include/c++/4.8/string:51:0,
from /usr/include/c++/4.8/stdexcept:39,
from /usr/include/c++/4.8/array:38,
from /usr/include/c++/4.8/tuple:39,
from /usr/include/c++/4.8/functional:55,
from /usr/include/c++/4.8/memory:79,
from ./tensorflow_serving/session_bundle/session_bundle.h:21,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
/usr/include/c++/4.8/bits/range_access.h:97:5: note: template<class _Tp, long unsigned int _Nm> _Tp* std::end(_Tp (&)[_Nm])
end(_Tp (&__arr)[_Nm])
^
/usr/include/c++/4.8/bits/range_access.h:97:5: note: template argument deduction/substitution failed:
tensorflow_serving/session_bundle/session_bundle.cc:71:24: note: mismatched types '_Tp [_Nm]' and 'const int'
for (auto& asset : asset_files) {
^
In file included from /usr/include/c++/4.8/string:51:0,
from /usr/include/c++/4.8/stdexcept:39,
from /usr/include/c++/4.8/array:38,
from /usr/include/c++/4.8/tuple:39,
from /usr/include/c++/4.8/functional:55,
from /usr/include/c++/4.8/memory:79,
from ./tensorflow_serving/session_bundle/session_bundle.h:21,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
/usr/include/c++/4.8/bits/range_access.h:78:5: note: template<class _Container> decltype (__cont.end()) std::end(const _Container&)
end(const _Container& __cont) -> decltype(__cont.end())
^
/usr/include/c++/4.8/bits/range_access.h:78:5: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/bits/range_access.h: In substitution of 'template<class _Container> decltype (__cont.end()) std::end(const _Container&) [with _Container = int]':
tensorflow_serving/session_bundle/session_bundle.cc:71:24: required from here
/usr/include/c++/4.8/bits/range_access.h:78:5: error: request for member 'end' in '__cont', which is of non-class type 'const int'
/usr/include/c++/4.8/bits/range_access.h:68:5: note: template<class _Container> decltype (__cont.end()) std::end(_Container&)
end(_Container& __cont) -> decltype(__cont.end())
^
/usr/include/c++/4.8/bits/range_access.h:68:5: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/bits/range_access.h: In substitution of 'template<class _Container> decltype (__cont.end()) std::end(_Container&) [with _Container = const int]':
tensorflow_serving/session_bundle/session_bundle.cc:71:24: required from here
/usr/include/c++/4.8/bits/range_access.h:68:5: error: request for member 'end' in '__cont', which is of non-class type 'const int'
In file included from /usr/include/c++/4.8/utility:74:0,
from /usr/include/c++/4.8/tuple:38,
from /usr/include/c++/4.8/functional:55,
from /usr/include/c++/4.8/memory:79,
from ./tensorflow_serving/session_bundle/session_bundle.h:21,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
/usr/include/c++/4.8/initializer_list:99:5: note: template<class _Tp> constexpr const _Tp* std::end(std::initializer_list<_Tp>)
end(initializer_list<_Tp> __ils) noexcept
^
/usr/include/c++/4.8/initializer_list:99:5: note: template argument deduction/substitution failed:
tensorflow_serving/session_bundle/session_bundle.cc:71:24: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
for (auto& asset : asset_files) {
^
tensorflow_serving/session_bundle/session_bundle.cc:76:69: error: no matching function for call to 'std::vector<std::pair<std::basic_string<char>, tensorflow::Tensor> >::push_back(<brace-enclosed initializer list>)'
{asset.tensor_binding().tensor_name(), assets_file_tensor});
^
tensorflow_serving/session_bundle/session_bundle.cc:76:69: note: candidates are:
In file included from /usr/include/c++/4.8/vector:64:0,
from external/protobuf/src/google/protobuf/unknown_field_set.h:43,
from external/protobuf/src/google/protobuf/metadata.h:43,
from bazel-out/local-fastbuild/genfiles/external/org_tensorflow/tensorflow/core/lib/core/error_codes.pb.h:25,
from external/org_tensorflow/tensorflow/core/lib/core/status.h:22,
from ./tensorflow_serving/session_bundle/session_bundle.h:23,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
/usr/include/c++/4.8/bits/stl_vector.h:901:7: note: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<std::basic_string<char>, tensorflow::Tensor>; _Alloc = std::allocator<std::pair<std::basic_string<char>, tensorflow::Tensor> >; std::vector<_Tp, _Alloc>::value_type = std::pair<std::basic_string<char>, tensorflow::Tensor>]
push_back(const value_type& __x)
^
/usr/include/c++/4.8/bits/stl_vector.h:901:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type& {aka const std::pair<std::basic_string<char>, tensorflow::Tensor>&}'
/usr/include/c++/4.8/bits/stl_vector.h:919:7: note: void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::pair<std::basic_string<char>, tensorflow::Tensor>; _Alloc = std::allocator<std::pair<std::basic_string<char>, tensorflow::Tensor> >; std::vector<_Tp, _Alloc>::value_type = std::pair<std::basic_string<char>, tensorflow::Tensor>]
push_back(value_type&& __x)
^
/usr/include/c++/4.8/bits/stl_vector.h:919:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<std::pair<std::basic_string<char>, tensorflow::Tensor> >::value_type&& {aka std::pair<std::basic_string<char>, tensorflow::Tensor>&&}'
tensorflow_serving/session_bundle/session_bundle.cc: At global scope:
tensorflow_serving/session_bundle/session_bundle.cc:103:39: error: 'AssetFile' was not declared in this scope
const std::vector<AssetFile>& asset_files,
^
tensorflow_serving/session_bundle/session_bundle.cc:103:39: note: suggested alternative:
In file included from ./tensorflow_serving/session_bundle/manifest.pb.h:19:0,
from ./tensorflow_serving/session_bundle/session_bundle.h:29,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
bazel-out/local-fastbuild/genfiles/external/org_tensorflow/tensorflow/contrib/session_bundle/manifest.pb.h:237:7: note: 'tensorflow::contrib::AssetFile'
class AssetFile : public ::google::protobuf::Message {
^
tensorflow_serving/session_bundle/session_bundle.cc:103:48: error: template argument 1 is invalid
const std::vector<AssetFile>& asset_files,
^
tensorflow_serving/session_bundle/session_bundle.cc:103:48: error: template argument 2 is invalid
tensorflow_serving/session_bundle/session_bundle.cc:117:36: error: 'AssetFile' was not declared in this scope
const std::vector<AssetFile>& asset_files,
^
tensorflow_serving/session_bundle/session_bundle.cc:117:36: note: suggested alternative:
In file included from ./tensorflow_serving/session_bundle/manifest.pb.h:19:0,
from ./tensorflow_serving/session_bundle/session_bundle.h:29,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
bazel-out/local-fastbuild/genfiles/external/org_tensorflow/tensorflow/contrib/session_bundle/manifest.pb.h:237:7: note: 'tensorflow::contrib::AssetFile'
class AssetFile : public ::google::protobuf::Message {
^
tensorflow_serving/session_bundle/session_bundle.cc:117:45: error: template argument 1 is invalid
const std::vector<AssetFile>& asset_files,
^
tensorflow_serving/session_bundle/session_bundle.cc:117:45: error: template argument 2 is invalid
tensorflow_serving/session_bundle/session_bundle.cc: In function 'tensorflow::Status tensorflow::serving::LoadSessionBundleFromPath(const tensorflow::SessionOptions&, tensorflow::StringPiece, tensorflow::serving::SessionBundle*)':
tensorflow_serving/session_bundle/session_bundle.cc:165:15: error: 'AssetFile' was not declared in this scope
std::vector<AssetFile> asset_files;
^
tensorflow_serving/session_bundle/session_bundle.cc:165:15: note: suggested alternative:
In file included from ./tensorflow_serving/session_bundle/manifest.pb.h:19:0,
from ./tensorflow_serving/session_bundle/session_bundle.h:29,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
bazel-out/local-fastbuild/genfiles/external/org_tensorflow/tensorflow/contrib/session_bundle/manifest.pb.h:237:7: note: 'tensorflow::contrib::AssetFile'
class AssetFile : public ::google::protobuf::Message {
^
tensorflow_serving/session_bundle/session_bundle.cc:165:24: error: template argument 1 is invalid
std::vector<AssetFile> asset_files;
^
tensorflow_serving/session_bundle/session_bundle.cc:165:24: error: template argument 2 is invalid
tensorflow_serving/session_bundle/session_bundle.cc:165:37: error: invalid type in declaration before ';' token
std::vector<AssetFile> asset_files;
^
tensorflow_serving/session_bundle/session_bundle.cc:170:17: error: expected ';' before 'asset_file'
AssetFile asset_file;
^
tensorflow_serving/session_bundle/session_bundle.cc:171:25: error: the value of 'AssetFile' is not usable in a constant expression
if (!any_asset.Is<AssetFile>()) {
^
tensorflow_serving/session_bundle/session_bundle.cc:165:15: note: 'AssetFile' was not declared 'constexpr'
std::vector<AssetFile> asset_files;
^
tensorflow_serving/session_bundle/session_bundle.cc:171:36: error: no matching function for call to 'google::protobuf::Any::Is() const'
if (!any_asset.Is<AssetFile>()) {
^
tensorflow_serving/session_bundle/session_bundle.cc:171:36: note: candidate is:
In file included from bazel-out/local-fastbuild/genfiles/external/org_tensorflow/tensorflow/core/protobuf/meta_graph.pb.h:32:0,
from ./tensorflow_serving/session_bundle/session_bundle.h:25,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
external/protobuf/src/google/protobuf/any.pb.h:66:29: note: template<class T> bool google::protobuf::Any::Is() const
template<typename T> bool Is() const {
^
external/protobuf/src/google/protobuf/any.pb.h:66:29: note: template argument deduction/substitution failed:
tensorflow_serving/session_bundle/session_bundle.cc:174:13: error: 'asset_file' was not declared in this scope
asset_file.descriptor()->full_name(), ". Got: ",
^
tensorflow_serving/session_bundle/session_bundle.cc:178:32: error: 'asset_file' was not declared in this scope
if (!any_asset.UnpackTo(&asset_file)) {
^
tensorflow_serving/session_bundle/session_bundle.cc:182:19: error: request for member 'push_back' in 'asset_files', which is of non-class type 'int'
asset_files.push_back(asset_file);
^
tensorflow_serving/session_bundle/session_bundle.cc:182:29: error: 'asset_file' was not declared in this scope
asset_files.push_back(asset_file);
^
Target //tensorflow_serving/example:mnist_inference_2 failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 4.822s, Critical Path: 4.54s
From the page you linked: "Before getting started, please complete the prerequisites."
The type Signatures is defined in a header generated by following said prereqs process, so you've either not followed those steps or not followed them correctly – there's no way to tell which just from the compiler errors.
I can't get my C++ program to compile. As you can see, I'm writing a Node.js addon. Here is the code (Eamorr_addon.cpp):
#include <iostream>
#include <v8.h>
#include <node.h>
#include <gmp.h>
#include "Definitions.h"
#include "Rk.h"
#include "tbb/concurrent_hash_map.h"
//#include <tbb/concurrent_vector.h>
using namespace std;
using namespace v8;
static Handle<Value> Echo(const Arguments& args) {
HandleScope scope;
if (args.Length() < 1) {
return ThrowException(Exception::TypeError(String::New("Bad argument")));
}
return scope.Close(args[0]);
}
extern "C" void init (Handle<Object> target)
{
HandleScope scope;
target->Set(String::New("hello"), String::New("world"));
NODE_SET_METHOD(target, "echo", Echo);
}
Everything works just fine when I remove the line #include "tbb/concurrent_hash_map.h".
Here is my gyp make file:
{
'targets': [
{
'target_name':'Eamorr_addon',
'sources':['src/Eamorr_addon.cpp'],
'include_dirs': ['/usr/include','/usr/local/include/'],
'cflags': ['-Wall','-fopenmp'],
'ldflags': ['-ltbb','-lgmp']
}
]
}
When I do node-gyp build, I get the following stream of errors which I can't get to the bottom of:
node-gyp build
info it worked if it ends with ok
spawn make [ 'BUILDTYPE=Release', '-f', 'Makefile.gyp' ]
CXX(target) out/Release/obj.target/DeDuplicator_addon/src/DeDuplicator_addon.o
In file included from /usr/include/tbb/concurrent_hash_map.h:51:0,
from src/DeDuplicator_addon.cpp:17:
/usr/include/tbb/atomic.h:218:31: error: expected nested-name-specifier before numeric constant
/usr/include/tbb/atomic.h:218:31: error: expected ‘>’ before numeric constant
/usr/include/tbb/atomic.h:224:33: error: expected ‘)’ before ‘addend’
/usr/include/tbb/atomic.h:224:40: error: ISO C++ forbids initialization of member ‘fetch_and_add’
/usr/include/tbb/atomic.h:224:40: error: making ‘fetch_and_add’ static
/usr/include/tbb/atomic.h:224:40: error: template declaration of ‘value_type tbb::internal::fetch_and_add’
In file included from /usr/include/tbb/concurrent_hash_map.h:51:0,
from src/DeDuplicator_addon.cpp:17:
/usr/include/tbb/atomic.h:228:31: error: expected identifier before numeric constant
/usr/include/tbb/atomic.h:228:31: error: expected ‘,’ or ‘...’ before numeric constant
/usr/include/tbb/atomic.h:251:28: error: expected identifier before numeric constant
/usr/include/tbb/atomic.h:251:28: error: expected ‘,’ or ‘...’ before numeric constant
/usr/include/tbb/atomic.h:255:28: error: expected identifier before numeric constant
/usr/include/tbb/atomic.h:255:28: error: expected ‘,’ or ‘...’ before numeric constant
/usr/include/tbb/atomic.h: In member function ‘value_type tbb::internal::atomic_impl_with_arithmetic<I, <anonymous> >::fetch_and_add(int)’:
/usr/include/tbb/atomic.h:229:48: error: ‘addend’ was not declared in this scope
/usr/include/tbb/atomic.h: In member function ‘value_type tbb::internal::atomic_impl_with_arithmetic<I, <anonymous> >::fetch_and_decrement()’:
/usr/include/tbb/atomic.h:243:33: error: ‘2’ cannot be used as a function
/usr/include/tbb/atomic.h:243:33: error: ‘2’ cannot be used as a function
/usr/include/tbb/atomic.h:243:33: error: ‘2’ cannot be used as a function
/usr/include/tbb/atomic.h: In member function ‘value_type tbb::internal::atomic_impl_with_arithmetic<I, <anonymous> >::fetch_and_decrement()’:
/usr/include/tbb/atomic.h:247:30: error: ‘2’ cannot be used as a function
/usr/include/tbb/atomic.h:247:30: error: ‘2’ cannot be used as a function
/usr/include/tbb/atomic.h:247:30: error: ‘2’ cannot be used as a function
/usr/include/tbb/atomic.h: In member function ‘value_type tbb::internal::atomic_impl_with_arithmetic<I, <anonymous> >::operator+=(int)’:
/usr/include/tbb/atomic.h:252:30: error: ‘addend’ was not declared in this scope
/usr/include/tbb/atomic.h: In member function ‘value_type tbb::internal::atomic_impl_with_arithmetic<I, <anonymous> >::operator-=(int)’:
/usr/include/tbb/atomic.h:258:30: error: ‘2’ cannot be used as a function
/usr/include/tbb/atomic.h:258:32: error: ‘addend’ was not declared in this scope
/usr/include/tbb/atomic.h: In member function ‘value_type tbb::internal::atomic_impl_with_arithmetic<I, <anonymous> >::operator--()’:
/usr/include/tbb/atomic.h:266:30: error: ‘2’ cannot be used as a function
/usr/include/tbb/atomic.h:266:30: error: ‘2’ cannot be used as a function
/usr/include/tbb/atomic.h:266:30: error: ‘2’ cannot be used as a function
/usr/include/tbb/atomic.h: In member function ‘value_type tbb::internal::atomic_impl_with_arithmetic<I, <anonymous> >::operator--(int)’:
/usr/include/tbb/atomic.h:274:30: error: ‘2’ cannot be used as a function
/usr/include/tbb/atomic.h:274:30: error: ‘2’ cannot be used as a function
/usr/include/tbb/atomic.h:274:30: error: ‘2’ cannot be used as a function
/usr/include/tbb/atomic.h: At global scope:
/usr/include/tbb/atomic.h:329:1: error: wrong number of template arguments (3, should be 2)
/usr/include/tbb/atomic.h:219:8: error: provided for ‘template<class I, int <anonymous> > struct tbb::internal::atomic_impl_with_arithmetic’
/usr/include/tbb/atomic.h: In member function ‘long long int tbb::atomic<long long int>::operator=(long long int)’:
/usr/include/tbb/atomic.h:329:1: error: ‘store_with_release’ was not declared in this scope
/usr/include/tbb/atomic.h: In member function ‘tbb::atomic<long long int>& tbb::atomic<long long int>::operator=(const tbb::atomic<long long int>&)’:
/usr/include/tbb/atomic.h:329:1: error: ‘store_with_release’ was not declared in this scope
/usr/include/tbb/atomic.h: At global scope:
/usr/include/tbb/atomic.h:330:1: error: wrong number of template arguments (3, should be 2)
/usr/include/tbb/atomic.h:219:8: error: provided for ‘template<class I, int <anonymous> > struct tbb::internal::atomic_impl_with_arithmetic’
/usr/include/tbb/atomic.h: In member function ‘long long unsigned int tbb::atomic<long long unsigned int>::operator=(long long unsigned int)’:
/usr/include/tbb/atomic.h:330:1: error: ‘store_with_release’ was not declared in this scope
/usr/include/tbb/atomic.h: In member function ‘tbb::atomic<long long unsigned int>& tbb::atomic<long long unsigned int>::operator=(const tbb::atomic<long long unsigned int>&)’:
/usr/include/tbb/atomic.h:330:1: error: ‘store_with_release’ was not declared in this scope
/usr/include/tbb/atomic.h: At global scope:
/usr/include/tbb/atomic.h:335:1: error: wrong number of template arguments (3, should be 2)
/usr/include/tbb/atomic.h:219:8: error: provided for ‘template<class I, int <anonymous> > struct tbb::internal::atomic_impl_with_arithmetic’
/usr/include/tbb/atomic.h: In member function ‘long int tbb::atomic<long int>::operator=(long int)’:
/usr/include/tbb/atomic.h:335:1: error: ‘store_with_release’ was not declared in this scope
/usr/include/tbb/atomic.h: In member function ‘tbb::atomic<long int>& tbb::atomic<long int>::operator=(const tbb::atomic<long int>&)’:
/usr/include/tbb/atomic.h:335:1: error: ‘store_with_release’ was not declared in this scope
/usr/include/tbb/atomic.h: At global scope:
/usr/include/tbb/atomic.h:336:1: error: wrong number of template arguments (3, should be 2)
/usr/include/tbb/atomic.h:219:8: error: provided for ‘template<class I, int <anonymous> > struct tbb::internal::atomic_impl_with_arithmetic’
/usr/include/tbb/atomic.h: In member function ‘long unsigned int tbb::atomic<long unsigned int>::operator=(long unsigned int)’:
/usr/include/tbb/atomic.h:336:1: error: ‘store_with_release’ was not declared in this scope
/usr/include/tbb/atomic.h: In member function ‘tbb::atomic<long unsigned int>& tbb::atomic<long unsigned int>::operator=(const tbb::atomic<long unsigned int>&)’:
/usr/include/tbb/atomic.h:336:1: error: ‘store_with_release’ was not declared in this scope
/usr/include/tbb/atomic.h: At global scope:
/usr/include/tbb/atomic.h:352:1: error: wrong number of template arguments (3, should be 2)
/usr/include/tbb/atomic.h:219:8: error: provided for ‘template<class I, int <anonymous> > struct tbb::internal::atomic_impl_with_arithmetic’
/usr/include/tbb/atomic.h: In member function ‘unsigned int tbb::atomic<unsigned int>::operator=(unsigned int)’:
/usr/include/tbb/atomic.h:352:1: error: ‘store_with_release’ was not declared in this scope
/usr/include/tbb/atomic.h: In member function ‘tbb::atomic<unsigned int>& tbb::atomic<unsigned int>::operator=(const tbb::atomic<unsigned int>&)’:
/usr/include/tbb/atomic.h:352:1: error: ‘store_with_release’ was not declared in this scope
/usr/include/tbb/atomic.h: At global scope:
/usr/include/tbb/atomic.h:353:1: error: wrong number of template arguments (3, should be 2)
/usr/include/tbb/atomic.h:219:8: error: provided for ‘template<class I, int <anonymous> > struct tbb::internal::atomic_impl_with_arithmetic’
/usr/include/tbb/atomic.h: In member function ‘int tbb::atomic<int>::operator=(int)’:
/usr/include/tbb/atomic.h:353:1: error: ‘store_with_release’ was not declared in this scope
/usr/include/tbb/atomic.h: In member function ‘tbb::atomic<int>& tbb::atomic<int>::operator=(const tbb::atomic<int>&)’:
/usr/include/tbb/atomic.h:353:1: error: ‘store_with_release’ was not declared in this scope
/usr/include/tbb/atomic.h: At global scope:
/usr/include/tbb/atomic.h:356:1: error: wrong number of template arguments (3, should be 2)
/usr/include/tbb/atomic.h:219:8: error: provided for ‘template<class I, int <anonymous> > struct tbb::internal::atomic_impl_with_arithmetic’
/usr/include/tbb/atomic.h: In member function ‘short unsigned int tbb::atomic<short unsigned int>::operator=(short unsigned int)’:
/usr/include/tbb/atomic.h:356:1: error: ‘store_with_release’ was not declared in this scope
/usr/include/tbb/atomic.h: In member function ‘tbb::atomic<short unsigned int>& tbb::atomic<short unsigned int>::operator=(const tbb::atomic<short unsigned int>&)’:
/usr/include/tbb/atomic.h:356:1: error: ‘store_with_release’ was not declared in this scope
/usr/include/tbb/atomic.h: At global scope:
/usr/include/tbb/atomic.h:357:1: error: wrong number of template arguments (3, should be 2)
/usr/include/tbb/atomic.h:219:8: error: provided for ‘template<class I, int <anonymous> > struct tbb::internal::atomic_impl_with_arithmetic’
/usr/include/tbb/atomic.h: In member function ‘short int tbb::atomic<short int>::operator=(short int)’:
/usr/include/tbb/atomic.h:357:1: error: ‘store_with_release’ was not declared in this scope
/usr/include/tbb/atomic.h: In member function ‘tbb::atomic<short int>& tbb::atomic<short int>::operator=(const tbb::atomic<short int>&)’:
/usr/include/tbb/atomic.h:357:1: error: ‘store_with_release’ was not declared in this scope
/usr/include/tbb/atomic.h: At global scope:
/usr/include/tbb/atomic.h:358:1: error: wrong number of template arguments (3, should be 2)
/usr/include/tbb/atomic.h:219:8: error: provided for ‘template<class I, int <anonymous> > struct tbb::internal::atomic_impl_with_arithmetic’
/usr/include/tbb/atomic.h: In member function ‘char tbb::atomic<char>::operator=(char)’:
/usr/include/tbb/atomic.h:358:1: error: ‘store_with_release’ was not declared in this scope
/usr/include/tbb/atomic.h: In member function ‘tbb::atomic<char>& tbb::atomic<char>::operator=(const tbb::atomic<char>&)’:
/usr/include/tbb/atomic.h:358:1: error: ‘store_with_release’ was not declared in this scope
/usr/include/tbb/atomic.h: At global scope:
/usr/include/tbb/atomic.h:359:1: error: wrong number of template arguments (3, should be 2)
/usr/include/tbb/atomic.h:219:8: error: provided for ‘template<class I, int <anonymous> > struct tbb::internal::atomic_impl_with_arithmetic’
/usr/include/tbb/atomic.h: In member function ‘signed char tbb::atomic<signed char>::operator=(signed char)’:
/usr/include/tbb/atomic.h:359:1: error: ‘store_with_release’ was not declared in this scope
/usr/include/tbb/atomic.h: In member function ‘tbb::atomic<signed char>& tbb::atomic<signed char>::operator=(const tbb::atomic<signed char>&)’:
/usr/include/tbb/atomic.h:359:1: error: ‘store_with_release’ was not declared in this scope
/usr/include/tbb/atomic.h: At global scope:
/usr/include/tbb/atomic.h:360:1: error: wrong number of template arguments (3, should be 2)
/usr/include/tbb/atomic.h:219:8: error: provided for ‘template<class I, int <anonymous> > struct tbb::internal::atomic_impl_with_arithmetic’
/usr/include/tbb/atomic.h: In member function ‘unsigned char tbb::atomic<unsigned char>::operator=(unsigned char)’:
/usr/include/tbb/atomic.h:360:1: error: ‘store_with_release’ was not declared in this scope
/usr/include/tbb/atomic.h: In member function ‘tbb::atomic<unsigned char>& tbb::atomic<unsigned char>::operator=(const tbb::atomic<unsigned char>&)’:
/usr/include/tbb/atomic.h:360:1: error: ‘store_with_release’ was not declared in this scope
/usr/include/tbb/atomic.h: At global scope:
/usr/include/tbb/atomic.h:363:1: error: wrong number of template arguments (3, should be 2)
/usr/include/tbb/atomic.h:219:8: error: provided for ‘template<class I, int <anonymous> > struct tbb::internal::atomic_impl_with_arithmetic’
/usr/include/tbb/atomic.h: In member function ‘wchar_t tbb::atomic<wchar_t>::operator=(wchar_t)’:
/usr/include/tbb/atomic.h:363:1: error: ‘store_with_release’ was not declared in this scope
/usr/include/tbb/atomic.h: In member function ‘tbb::atomic<wchar_t>& tbb::atomic<wchar_t>::operator=(const tbb::atomic<wchar_t>&)’:
/usr/include/tbb/atomic.h:363:1: error: ‘store_with_release’ was not declared in this scope
/usr/include/tbb/atomic.h: At global scope:
/usr/include/tbb/atomic.h:367:93: error: wrong number of template arguments (3, should be 2)
/usr/include/tbb/atomic.h:219:8: error: provided for ‘template<class I, int <anonymous> > struct tbb::internal::atomic_impl_with_arithmetic’
In file included from src/DeDuplicator_addon.cpp:17:0:
/usr/include/tbb/concurrent_hash_map.h: In member function ‘bool tbb::interface4::internal::hash_map_base::check_mask_race(tbb::interface4::internal::hash_map_base::hashcode_t, tbb::interface4::internal::hash_map_base::hashcode_t&) const’:
/usr/include/tbb/concurrent_hash_map.h:266:21: error: cannot convert ‘const tbb::atomic<long unsigned int>’ to ‘tbb::interface4::internal::hash_map_base::hashcode_t’ in assignment
/usr/include/tbb/concurrent_hash_map.h: In member function ‘tbb::interface4::internal::hash_map_base::segment_index_t tbb::interface4::internal::hash_map_base::insert_new_node(tbb::interface4::internal::hash_map_base::bucket*, tbb::interface4::internal::hash_map_base::node_base*, tbb::interface4::internal::hash_map_base::hashcode_t)’:
/usr/include/tbb/concurrent_hash_map.h:296:30: error: no match for ‘operator++’ in ‘++((tbb::interface4::internal::hash_map_base*)this)->tbb::interface4::internal::hash_map_base::my_size’
/usr/include/tbb/concurrent_hash_map.h: In member function ‘void tbb::interface4::internal::hash_map_base::reserve(tbb::interface4::internal::hash_map_base::size_type)’:
/usr/include/tbb/concurrent_hash_map.h:316:32: error: no match for ‘operator!’ in ‘!((tbb::interface4::internal::hash_map_base*)this)->tbb::interface4::internal::hash_map_base::my_size’
/usr/include/tbb/concurrent_hash_map.h:316:32: note: candidate is: operator!(bool) <built-in>
/usr/include/tbb/concurrent_hash_map.h:317:32: error: cannot convert ‘tbb::atomic<long unsigned int>’ to ‘tbb::interface4::internal::hash_map_base::size_type’ in initialization
/usr/include/tbb/concurrent_hash_map.h:317:58: error: cannot convert ‘tbb::atomic<long unsigned int>’ to ‘tbb::interface4::internal::hash_map_base::size_type’ in assignment
/usr/include/tbb/concurrent_hash_map.h: In member function ‘bool tbb::interface4::concurrent_hash_map<Key, T, HashCompare, A>::empty() const’:
/usr/include/tbb/concurrent_hash_map.h:833:44: error: no match for ‘operator==’ in ‘((const tbb::interface4::concurrent_hash_map<Key, T, HashCompare, A>*)this)->tbb::interface4::internal::hash_map_base::my_size == 0’
/usr/include/tbb/concurrent_hash_map.h: In member function ‘tbb::interface4::concurrent_hash_map::size_type tbb::interface4::concurrent_hash_map<Key, T, HashCompare, A>::bucket_count() const’:
/usr/include/tbb/concurrent_hash_map.h:839:53: error: no match for ‘operator+’ in ‘((const tbb::interface4::concurrent_hash_map<Key, T, HashCompare, A>*)this)->tbb::interface4::internal::hash_map_base::my_mask + 1’
/usr/include/tbb/concurrent_hash_map.h: In member function ‘bool tbb::interface4::concurrent_hash_map<Key, T, HashCompare, A>::exclude(tbb::interface4::concurrent_hash_map<Key, T, HashCompare, A>::const_accessor&, bool)’:
/usr/include/tbb/concurrent_hash_map.h:1119:16: error: no ‘operator--(int)’ declared for postfix ‘--’
/usr/include/tbb/concurrent_hash_map.h: In member function ‘bool tbb::interface4::concurrent_hash_map<Key, T, HashCompare, A>::erase(const Key&)’:
/usr/include/tbb/concurrent_hash_map.h:1160:16: error: no ‘operator--(int)’ declared for postfix ‘--’
/usr/include/tbb/concurrent_hash_map.h: In member function ‘void tbb::interface4::concurrent_hash_map<Key, T, HashCompare, A>::internal_copy(const tbb::interface4::concurrent_hash_map<Key, T, HashCompare, A>&)’:
/usr/include/tbb/concurrent_hash_map.h:1310:20: error: no match for ‘operator==’ in ‘((tbb::interface4::concurrent_hash_map<Key, T, HashCompare, A>*)this)->tbb::interface4::internal::hash_map_base::my_mask == mask’
/usr/include/tbb/concurrent_hash_map.h:1323:19: error: no match for ‘operator++’ in ‘++((tbb::interface4::concurrent_hash_map<Key, T, HashCompare, A>*)this)->tbb::interface4::internal::hash_map_base::my_size’
/usr/include/tbb/concurrent_hash_map.h: In member function ‘void tbb::interface4::concurrent_hash_map<Key, T, HashCompare, A>::internal_copy(I, I)’:
/usr/include/tbb/concurrent_hash_map.h:1340:11: error: no match for ‘operator++’ in ‘++((tbb::interface4::concurrent_hash_map<Key, T, HashCompare, A>*)this)->tbb::interface4::internal::hash_map_base::my_size’
make: *** [out/Release/obj.target/DeDuplicator_addon/src/DeDuplicator_addon.o] Error 1
ERR! Error: `make` failed with exit code: 2
at Array.0 (/usr/local/lib/node_modules/node-gyp/lib/build.js:118:25)
at EventEmitter._tickCallback (node.js:192:40)
ERR! not ok
Can anyone suggest anything?
Edit:
Here is "Rk.h":
#ifndef RK_H_
#define RK_H_
#include <gmp.h>
#include "Definitions.h"
unsigned long int init_rkHash(char* str);
unsigned long int get_rkHash(unsigned long int prevHash,int prevAscii,int topAscii);
/*unsigned long int getFirstPrevHash(char* &buffer);*/
#endif /* RK_H_ */
and here is "Definitions.h":
#ifndef DEFINITIONS_H_
#define DEFINITIONS_H_
#define PORT 10002
#define CHUNKSIZE 512
#define PRIME 9223372036854775783
#define D 2
#endif /* DEFINITIONS_H_ */
#define macros are easy to use wrong. And giving them names like D calls for problems.
You defined D as
#define D 2
Now, if we look at atomic.h, we find e.g.
...
template<typename I, typename D, typename StepType>
struct atomic_impl_with_arithmetic: atomic_impl<I> {
...
value_type fetch_and_add( D addend ) {
...
template<memory_semantics M>
value_type fetch_and_decrement() {
return fetch_and_add<M>(__TBB_MINUS_ONE(D));
}
...
See the correlation?
What you get is:
...
template<typename I, typename 2, typename StepType>
struct atomic_impl_with_arithmetic: atomic_impl<I> {
...
value_type fetch_and_add( 2 addend ) {
...
template<memory_semantics M>
value_type fetch_and_decrement() {
return fetch_and_add<M>(__TBB_MINUS_ONE(2));
}
...
This is not valid C++.
Solution: Don't give macros a name that will probably clash. Rule of thumb: Every neat name clashes at least once in a lifetime and produce subtle and unreal error messages that might infect a poor maintainers (you?) nightly dreams with visions of indescribable demons. Therefore, only use macros if you absolutely must.
If D is supposed to be an integer (but who, except you, knows by that name?), you can do one of the following:
enum { D = 2 };
or
extern const int D; // in a header
const int D = 2; // in exactly one source file
or you may rethink your decision whether D needs to be constant at all and instead pass it as a parameter to your functions and classes.
Here is an excerpt from tbb/atomic.h
template<typename I, typename D, typename StepType>
struct atomic_impl_with_arithmetic: atomic_impl<I> {
public:
typedef I value_type;
template<memory_semantics M>
value_type fetch_and_add( D addend ) {
return value_type(internal::atomic_traits<sizeof(value_type),M>::fetch_and_add( &this->rep.value, addend*sizeof(StepType) ));
}
...
Now, if you substitute definition for D from Definitions.h you'll see what the issue is. In general it's a bad idea to make macro definitions with such names. If you've got too much code dependent on D you can fix the issue by undefining it befor including tbb headers, something like this:
#include "Definitions.h"
#include "Rk.h"
#pragma push_macro("D")
#undef D
#include "tbb/concurrent_hash_map.h"
#include <tbb/concurrent_vector.h>
#pragma pop_macro("D")