riebl / artery

OMNeT++ V2X simulation framework for ETSI ITS-G5
GNU General Public License v2.0
203 stars 131 forks source link

Including simuLTE .h files in my scenario #232

Closed BadreddineYACHEUR closed 2 years ago

BadreddineYACHEUR commented 2 years ago

Hi @riebl, I want to include a simulte .h file in my scenario. However, it is not possible to do it, and I get the "No such file or directory" error. I also noticed that there is no way to include a simulte file in any of the artery files.

I tried to add the simulte/src directory as an include directory in my scenario's CMakeLists file, but it doesn't work because it needs the "artery/build/lte_gen" directory.

I'm trying to include the simulte .h file like this: " #include "../../extern/simulte/src/stack/phy/ChannelModel/LteRealisticChannelModel.h" " or like this: " #include "stack/phy/ChannelModel/LteRealisticChannelModel.h" "

This operation works fine with INET .h files but it doesn't work with SimuLTE .h files.

PS: Can you please tell me where the "lte_gen" directory is created, I couldn't find any line of code that creates it in the CMakeLists file of Artery.

Cordially, Badreddine Y.

riebl commented 2 years ago

The lte_gen directory is generated in your build directory. You can include SimuLTE headers and its include directory is added automatically to all CMake targets depending on the "lte" target. Hence, you may just need to add this target as a dependency to the target used to build your custom code.

BadreddineYACHEUR commented 2 years ago

Hey @riebl,

I just solved the issue, thank you very much. I replaced the target in: target_link_libraries(artery INTERFACE lte) into core: target_link_libraries(core INTERFACE lte)

Without this manipulation, I couldn't include any SimuLTE header file.

Cordially.