Classes which have same name but irrelevant are mixed up in CLion
Sorry I cannot describe accurately in the title.
Let me explain the matter in detail.
I have a class defined in main.cpp
like below. Let's call it `class A
`.
Also do I have a class defined like below. Let's call it `class B
`. Another class is inheriting the class B
, let's call it class C
.
The implementation of class B
is in library spike_libriscv
and I'm linking this library to my library my_lib
using:
target_link_libraries(my_lib PRIVATE spike_libriscv)
and I'm linking this my_lib
in my executable MyExec
:
add_executable(MyExec main.cpp)
target_link_libraries(MyExec my_lib)
Since the linking type of library spike_libriscv
is PRIVATE
, the spike_libriscv
should not be linked directly to the MyExec
. So the class A
and class B
should be irrelevant, and do not conflict with each other. However, in the GUI, CLion seems to also recognize class A
as the base class of class C
.
I believe my configuration is correct since no error like `redifinition of sim_t
` is throwed and the hello()
function could be called correctly in main.cpp
. Maybe you could take such situation into consideration in further versions. Anyway thanks to your attention.
Please sign in to leave a comment.