-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Closed
Labels
clang:modulesC++20 modules and Clang Header ModulesC++20 modules and Clang Header Modules
Description
Here's the example code. There is a base class in one partition, a subclass in another. I think it should work.
https://godbolt.org/z/W4nWj6G7E
The error is currently:
/opt/compiler-explorer/gcc-snapshot/lib/gcc/x86_64-linux-gnu/13.0.1/../../../../x86_64-linux-gnu/bin/ld:
CMakeFiles/mod_bug6.dir/Base.cc.o:(.rodata+0x0): multiple definition of `_ZTSW3Mod4Base';
CMakeFiles/mod_bug6.dir/main.cc.o:(.rodata+0x0): first defined here
clang++: error: linker command failed with exit code 1 (use -v to see invocation)On my laptop it's easier to read:
duplicate symbol 'typeinfo name for Base@Mod' in:
ModBug6/CMakeFiles/mod_bug6.dir/main.cc.o
ModBug6/CMakeFiles/mod_bug6.dir/Base.cc.o
duplicate symbol 'typeinfo for Base@Mod' in:
ModBug6/CMakeFiles/mod_bug6.dir/main.cc.o
ModBug6/CMakeFiles/mod_bug6.dir/Base.cc.o
ld: 2 duplicate symbols for architecture x86_64Metadata
Metadata
Assignees
Labels
clang:modulesC++20 modules and Clang Header ModulesC++20 modules and Clang Header Modules