You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "snikeguo (via GitHub)" <gi...@apache.org> on 2026/03/03 06:30:49 UTC
Re: [I] [BUG] cmath incompatible with external toolchain libraries [nuttx]
snikeguo commented on issue #18232:
URL: https://github.com/apache/nuttx/issues/18232#issuecomment-3988956759
@acassis @simbit18
I am very sorry, I was on vacation recently.after testing, the compilation still fails. Here are the test code and compilation results:
```
#include <stdint.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <wchar.h>
#include <assert.h>
#include <stdarg.h>
#include <memory.h>
#include <limits.h>
#include <math.h>
#include <new>
#include <type_traits>
#include <limits>
#include <algorithm>
D:/Project/runtime_nuttx/src/nuttx_workspace/apps/ics/NativeAot/user_code/usercode.cpp
In file included from D:/Soft/ArmGcc/xpack-arm-none-eabi-gcc-13.3.1-1.1/arm-none-eabi/include/c++/13.3.1/bits/std_abs.h:38,
from D:/Soft/ArmGcc/xpack-arm-none-eabi-gcc-13.3.1-1.1/arm-none-eabi/include/c++/13.3.1/cmath:49,
from D:/Project/runtime_nuttx/src/nuttx_workspace/nuttx/include/cxx/cmath:38,
from D:/Soft/ArmGcc/xpack-arm-none-eabi-gcc-13.3.1-1.1/arm-none-eabi/include/c++/13.3.1/math.h:36,
from D:/Project/runtime_nuttx/src/nuttx_workspace/apps/ics/NativeAot/user_code/usercode.cpp:221:
D:/Soft/ArmGcc/xpack-arm-none-eabi-gcc-13.3.1-1.1/arm-none-eabi/include/stdlib.h:39:3: error: conflicting declaration 'typedef struct div_t div_t'
39 | } div_t;
| ^~~~~
In file included from D:/Project/runtime_nuttx/src/nuttx_workspace/nuttx/include/nuttx/kmalloc.h:34,
from D:/Project/runtime_nuttx/src/nuttx_workspace/nuttx/include/nuttx/lib/lib.h:32,
from D:/Project/runtime_nuttx/src/nuttx_workspace/nuttx/include/stdio.h:37,
from D:/Project/runtime_nuttx/src/nuttx_workspace/apps/include/netutils/netlib.h:50,
from D:/Project/runtime_nuttx/src/nuttx_workspace/apps/ics/NativeAot/user_code/usercode.cpp:105:
D:/Project/runtime_nuttx/src/nuttx_workspace/nuttx/include/stdlib.h:98:22: note: previous declaration as 'typedef struct div_s div_t'
98 | typedef struct div_s div_t;
```
It is worth noting that I have switched to using the LLVM C++ library, and it works well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org