Error when compiling with C libs

barbosso barb at your.io
Sun Oct 13 20:06:44 UTC 2024


On Sunday, 13 October 2024 at 13:49:49 UTC, barbosso wrote:
> I can compile tilengine examples with clang, but with ldc I get 
> this error.
> Please explain the problem.
>
> ldc -betterC -gcc=clang -release -O3 -L-s -flto=full 
> -Xcc=-I./Tilengine/include -L-L./Tilengine/build 
> -L-l:libTilengine.a -L-lSDL2 -L-lpng -L-lm -L-lz 
> tilengine_main.d
>
> /usr/include/bits/floatn-common.h(214): Error: illegal 
> combination of type specifiers
> /usr/include/bits/floatn-common.h(251): Error: illegal 
> combination of type specifiers
> /usr/include/bits/floatn-common.h(268): Error: illegal 
> combination of type specifiers
> /usr/include/bits/floatn-common.h(285): Error: illegal 
> combination of type specifiers
> /usr/include/bits/floatn-common.h(285): Error: illegal type 
> combination

error in line
```typedef float _Float32;```
clang can compile that line,
but dmd or ldc can not!
This is definatly compiler error!


More information about the Digitalmars-d-learn mailing list