Git Product home page Git Product logo

Comments (8)

riebl avatar riebl commented on September 27, 2024

Have you added your sources to CMake?

from artery.

HuyTyskland avatar HuyTyskland commented on September 27, 2024

Yes I did. I created a CMakeLists.txt (scenarios/my_scenario/CMakeLists.txt) for the folder of my scenario in scenarios. I also used add_subdirectory for my scenario in the CMakeLists.txt (scenarios/CMakeLists.txt) of scenarios folders.

from artery.

riebl avatar riebl commented on September 27, 2024

Good. Did you also add the folder containing your MService.ned via the add_opp_run CMake macro and its NED_FOLDERS argument?

from artery.

HuyTyskland avatar HuyTyskland commented on September 27, 2024

I only did add_subdirectory(my_scenario) in artery/scenarios/CMakeLists.txt. I will do the add_opp_run in that CMakeLists.txt too.

from artery.

HuyTyskland avatar HuyTyskland commented on September 27, 2024

I just added add_opp_run(my_scenario WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/my_scenario) but there is an error: (the step1_multilane_noConsideration is my_scenario for easier typing btw)

CMake Error at cmake/AddOppRun.cmake:105 (add_custom_target):
  add_custom_target cannot create target
  "run_step1_multilane_noConsideration" because another target with the same
  name already exists.  The existing target is a custom target created in
  source directory
  "/home/huytyskland/src/artery_thesis/scenarios/step1_multilane_noConsideration".
  See documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
  scenarios/CMakeLists.txt:42 (add_opp_run)


-- Configuring incomplete, errors occurred!
See also "/home/huytyskland/src/artery_thesis/build/CMakeFiles/CMakeOutput.log".
See also "/home/huytyskland/src/artery_thesis/build/CMakeFiles/CMakeError.log".
make: *** [Makefile:32856: cmake_check_build_system] Error 1

from artery.

HuyTyskland avatar HuyTyskland commented on September 27, 2024

Ah I added in the wrong file. I deleted that add_opp_run in artery/scenarios/CMakeLists.txt and added the add_opp_run in the artery/scenarios/my_scenario/CMakeLists.txt. I added add_opp_run(my_scenario NED_FOLDERS ${CMAKE_CURRENT_SOURCE_DIR}). here is an error as below:

<!> Error: The following NED types could not be fully resolved due to a missing base type or interface: LLService, MService, NPService, PLService


End.
make[3]: *** [scenarios/step1_multilane_noConsideration/CMakeFiles/run_step1_multilane_noConsideration.dir/build.make:57: scenarios/step1_multilane_noConsideration/CMakeFiles/run_step1_multilane_noConsideration] Error 1
make[2]: *** [CMakeFiles/Makefile2:1729: scenarios/step1_multilane_noConsideration/CMakeFiles/run_step1_multilane_noConsideration.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:1736: scenarios/step1_multilane_noConsideration/CMakeFiles/run_step1_multilane_noConsideration.dir/rule] Error 2
make: *** [Makefile:643: run_step1_multilane_noConsideration] Error 2

from artery.

HuyTyskland avatar HuyTyskland commented on September 27, 2024

So far, I have been working with Artery in VSCode. However, when I view my project via Omnetpp and view the .ned file, there is a notification ("Not a NED file" as a title) from omnetpp saying that:

This NED file is not under a NED source folder or is in an excluded NED package, and will be opened in a standard text editor. If you want to edit it graphically, please move it into a NED source folder or remove package exclusion. NED Source Folders and package exclusion can be configured in the Project Properties dialog

Should that be the problem? I assume it isn't since the same notification happened with police-highway but that scenario can still be run.

from artery.

HuyTyskland avatar HuyTyskland commented on September 27, 2024

I figured out the cause of error. I made a grammar mistake in those .ned files: instead of import artery.application.ItsG5Service;, I put import artery.application ItsG5Service;. That's why services cannot recognize those .ned files.

@riebl thank you for your help. and sorry about my carelessness.

from artery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.