Bonjour, j'ai écris un moteur de jeux en c++20. Tout parsait bien jusque maintenat, lors de la compilation de la démo. (Du futur jeu) Seul clang était capable de compiler l'utilisation avancée des modules c++20 que j'ai intriduis dans mon moteur, mais, de manière instable :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: C:\\msys64\\mingw64\\bin\\clang++.exe "-DODFAEG_INSTALL_DIR=\"C:/Program Files (x86)/ODFAEG\"" -IC:/VulkanSDK/1.4.350.0/Include -IC:/Users/laure/Projets/ODFAEG/TestODFAEG2/external/imgui -isystem "C:/Program Files (x86)/ODFAEG/include" -isystem "C:/Program Files (x86)/ODFAEG/share/odfaeg/modules/Core" -isystem "C:/Program Files (x86)/ODFAEG/share/odfaeg/modules/Math" -isystem "C:/Program Files (x86)/ODFAEG/share/odfaeg/modules/Window" -isystem "C:/Program Files (x86)/ODFAEG/share/odfaeg/modules/Physics" -isystem "C:/Program Files (x86)/ODFAEG/share/odfaeg/modules/Entity" -isystem "C:/Program Files (x86)/ODFAEG/share/odfaeg/modules/Graphics" -stdlib=libc++ -stdlib=libc++ -O3 -DNDEBUG -std=gnu++20 -std=c++20 "-fprebuilt-module-path=C:/Program Files (x86)/ODFAEG/share/odfaeg/pcm/Core" "-fprebuilt-module-path=C:/Program Files (x86)/ODFAEG/share/odfaeg/pcm/Math" "-fprebuilt-module-path=C:/Program Files (x86)/ODFAEG/share/odfaeg/pcm/Window" "-fprebuilt-module-path=C:/Program Files (x86)/ODFAEG/share/odfaeg/pcm/Physics" "-fprebuilt-module-path=C:/Program Files (x86)/ODFAEG/share/odfaeg/pcm/Entity" "-fprebuilt-module-path=C:/Program Files (x86)/ODFAEG/share/odfaeg/pcm/Graphics" -MD -MT CMakeFiles/MyGame.dir/main.cpp.obj -MF CMakeFiles\\MyGame.dir\\main.cpp.obj.d @CMakeFiles\\MyGame.dir\\main.cpp.obj.modmap -o CMakeFiles/MyGame.dir/main.cpp.obj -c C:/Users/laure/Projets/ODFAEG/TestODFAEG2/main.cpp
1.      C:/Users/laure/Projets/ODFAEG/TestODFAEG2/main.cpp:57:1: current parser token 'enum'
Exception Code: 0xC0000005
 #0 0x00007ffa12f107a5 (C:\msys64\mingw64\bin\libclang-cpp.dll+0xc107a5)
 #1 0x00007ffa1393c651 (C:\msys64\mingw64\bin\libclang-cpp.dll+0x163c651)
 #2 0x00007ffa13bb0711 (C:\msys64\mingw64\bin\libclang-cpp.dll+0x18b0711)
 #3 0x00007ffa1456b169 (C:\msys64\mingw64\bin\libclang-cpp.dll+0x226b169)
 #4 0x00007ffa1454601b (C:\msys64\mingw64\bin\libclang-cpp.dll+0x224601b)
 #5 0x00007ffa1456f248 (C:\msys64\mingw64\bin\libclang-cpp.dll+0x226f248)
 #6 0x00007ffa1455c333 (C:\msys64\mingw64\bin\libclang-cpp.dll+0x225c333)
 #7 0x00007ffa1455a0fe (C:\msys64\mingw64\bin\libclang-cpp.dll+0x225a0fe)
 #8 0x00007ffa1455c51e (C:\msys64\mingw64\bin\libclang-cpp.dll+0x225c51e)
 #9 0x00007ffa14546465 (C:\msys64\mingw64\bin\libclang-cpp.dll+0x2246465)
#10 0x00007ffa1456f248 (C:\msys64\mingw64\bin\libclang-cpp.dll+0x226f248)
#11 0x00007ffa14c71988 (C:\msys64\mingw64\bin\libclang-cpp.dll+0x2971988)
#12 0x00007ffa13ba2fd9 (C:\msys64\mingw64\bin\libclang-cpp.dll+0x18a2fd9)
#13 0x00007ffa13a5c109 (C:\msys64\mingw64\bin\libclang-cpp.dll+0x175c109)
#14 0x00007ffa12525ace (C:\msys64\mingw64\bin\libclang-cpp.dll+0x225ace)
#15 0x00007ffa13ac3c53 (C:\msys64\mingw64\bin\libclang-cpp.dll+0x17c3c53)
#16 0x00007ffa13df1630 (C:\msys64\mingw64\bin\libclang-cpp.dll+0x1af1630)
#17 0x00007ffa13e752e0 (C:\msys64\mingw64\bin\libclang-cpp.dll+0x1b752e0)
#18 0x00007ffa13dcbcf8 (C:\msys64\mingw64\bin\libclang-cpp.dll+0x1acbcf8)
#19 0x00007ffa13e241ef (C:\msys64\mingw64\bin\libclang-cpp.dll+0x1b241ef)
#20 0x00007ffa13dd7a37 (C:\msys64\mingw64\bin\libclang-cpp.dll+0x1ad7a37)
#21 0x00007ffa1447f4ce (C:\msys64\mingw64\bin\libclang-cpp.dll+0x217f4ce)
#22 0x00007ffa13212a0f (C:\msys64\mingw64\bin\libclang-cpp.dll+0xf12a0f)
#23 0x00007ffa13397034 (C:\msys64\mingw64\bin\libclang-cpp.dll+0x1097034)
#24 0x00007ffa1397fced (C:\msys64\mingw64\bin\libclang-cpp.dll+0x167fced)
#25 0x00007ff7cb1bec93 (C:\msys64\mingw64\bin\clang++.exe+0xec93)
#26 0x00007ff7cb1bf0fd (C:\msys64\mingw64\bin\clang++.exe+0xf0fd)
#27 0x00007ff7cb1bf8f0 (C:\msys64\mingw64\bin\clang++.exe+0xf8f0)
#28 0x00007ffa12ab993d (C:\msys64\mingw64\bin\libclang-cpp.dll+0x7b993d)
#29 0x00007ffa0bbc4be9 (C:\msys64\mingw64\bin\libLLVM-22.dll+0x25b4be9)
#30 0x00007ffa149328c2 (C:\msys64\mingw64\bin\libclang-cpp.dll+0x26328c2)
#31 0x00007ffa14976394 (C:\msys64\mingw64\bin\libclang-cpp.dll+0x2676394)
#32 0x00007ffa14975e6c (C:\msys64\mingw64\bin\libclang-cpp.dll+0x2675e6c)
#33 0x00007ffa13f2cb79 (C:\msys64\mingw64\bin\libclang-cpp.dll+0x1c2cb79)
#34 0x00007ff7cb1ba891 (C:\msys64\mingw64\bin\clang++.exe+0xa891)
#35 0x00007ff7cb1c4e4f (C:\msys64\mingw64\bin\clang++.exe+0x14e4f)
#36 0x00007ff7cb1b10da (C:\msys64\mingw64\bin\clang++.exe+0x10da)
#37 0x00007ff7cb1b1456 (C:\msys64\mingw64\bin\clang++.exe+0x1456)
#38 0x00007ffafff1e957 (C:\Windows\System32\KERNEL32.DLL+0x2e957)
#39 0x00007ffb0202ad6c (C:\Windows\SYSTEM32\ntdll.dll+0xaad6c)
clang++: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 22.1.7 (https://github.com/msys2/MINGW-packages b8f306ad57e0c8f3f15aed0dc809d7e3e8e2eee9)
Target: x86_64-w64-windows-gnu
Thread model: posix
InstalledDir: C:/msys64/mingw64/bin
clang++: note: diagnostic msg:
********************
 
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++: note: diagnostic msg: C:/Users/laure/AppData/Local/Temp/main-7ffe51.cpp
clang++: note: diagnostic msg: C:/Users/laure/AppData/Local/Temp/main-7ffe51.sh
clang++: note: diagnostic msg:
 
********************
ninja: build stopped: subcommand failed.
Cette feature à été introduite en 2020 mais on est en 2026 et elle n'est toujours pas stable. Je sais plus trop quoi faire, soit faire un backend hybride qui supporte des .hpp et des .cpp en + des modules. (Assez lourd à faire pour une centaine de classes), attendre une feature qui ne sera probablement jamais stable car les modules du c++20 nécessitent une révision de toute la chaine de complication alors que c++ utilisais les #include depuis 40 ans. Pour moi il faudrait, mais carrément un nouveau compilateur pour rendre ces features stable, un réfractor ne fonctionnera jamais, ça serait comme essayer d'introduire vulkan dans opengl. Mais je suis incpable de faie un compilateur c++ et encore moins, corriger des bugs d'un compilateur existant.