【发布时间】:2021-12-14 04:24:51
【问题描述】:
我已将我的 Eclipse 项目从 Ubuntu 16.04,Eclipse 版本 Oxygen 移植到 Ubuntu 18.04,最新的 Eclipse 版本。还安装了支持旧程序的工具链。
我已确保旧项目中使用的工具链的所有环境变量都复制到新 Eclipse 的环境变量中。但是会出现以下编译器错误
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)
减少错误日志以适应字数限制
我为解决问题所采取的步骤
-
再次检查新Eclipse中的所有环境变量
-
查看构建消息:
我发现像“/usr/include/c++/7/............”这样的语句,我不明白为什么编译器路径指向我的主机目录而不是工具链目录'我发现与 glib 相关的错误
-
然后我去了我的 C/C++ 构建 >> 设置 >> 工具设置,我搜索了每一个包含但它没有指向我的主机目录的路径
-
我发现唯一的区别是使用了不同的编译器,我在工具链编辑器中使用了 Linux 编译器。但我不明白为什么它很重要,因为我已经用其他工具链编译了另一个交叉编译项目。编译成功
不知道可能是什么问题?需要一些方向
谢谢
【问题讨论】:
标签: c++ cross-compiling eclipse-cdt