Skip to content

Conversation

@yunlishao
Copy link
Contributor

Summary

Fixed ConfigureSumoLibraryPath() in mainTrafficLayer.cpp to correctly discover SUMO DLLs when TrafficLayer.exe is placed directly in the repo root directory. Changed the direct check from exeDir / "libsumo" / "bin" to exeDir / "CommonLib" / "libsumo" / "bin".

Related Issues / Tasks

Closes #83

Type of Change

  • Bug fix
  • New feature
  • Maintenance / Refactor
  • Documentation
  • Test case / scenario update

Affected Modules / Components

  • TrafficLayer/TrafficLayer/mainTrafficLayer.cpp (ConfigureSumoLibraryPath function)

Test Cases

Tested all three deployment scenarios:

  1. TrafficLayer.exe in repo/build/ folder
  2. TrafficLayer.exe in repo/TrafficLayer/x64/Debug or repo/TrafficLayer/x64/Release
  3. TrafficLayer.exe directly under repo/ root

Environment

Only fill in the tools used for testing this PR:

  • Python version:
  • MATLAB/Simulink/dSPACE version:
  • SUMO version: 1.21/1.22
  • VISSIM version:
  • IPG CarMaker version: 13.1.3

Checklist

  • Code compiles/runs as expected
  • Tests pass locally
  • Documentation is updated (if applicable)
  • Relevant issues are linked
  • Version-specific changes are noted (if any)

Additional Notes (optional)

The fix ensures the parent directory traversal logic works correctly for all scenarios by adding an explicit check for the direct CommonLib path in the exe directory first.

Corrected ConfigureSumoLibraryPath() to check exeDir/CommonLib/libsumo/bin
instead of exeDir/libsumo/bin. This fixes DLL discovery when TrafficLayer.exe
is placed directly in the repo root directory.

The fix ensures all three deployment scenarios work correctly:
- repo/build/TrafficLayer.exe (via parent traversal)
- repo/TrafficLayer/x64/Debug|Release/TrafficLayer.exe (via parent traversal)
- repo/TrafficLayer.exe (via direct check)

Related to #83
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] TrafficLayer.exe not finding SUMO DLLs in all deployment scenarios

3 participants