#include errors, compile_commands.json, expecting module rules named 'MDL'

Following along with the Compiling C++ for ObstacleAssault video, I’ve redone this entire section to this point multiple times. After creating the C++ class, accepting and then closing the editor, OR following the ‘accident’ path shown in the video as well, both give the same result. Updating/refreshing the VS code through the editor gives the same error message in the log that is shown in the VScode log after trying to build. That may not make a ton of sense outright, so in screenshots…
MovingPlatform.h shows the #include errors, and compile_commands.json suggestion.

Ignoring that for the moment (not optimal idea, but ‘lets try it’ mode), running the build task gives

Which is similar to what the editor warns when using Refresh Code

After performing build task in VScode, which fails, attempting to open project in UE will suggest rebuild, but this process just ends up being an endless loop, requiring starting from scratch.
missingObstacleAssaultModules
couldNotBeTryRebuildSourceManual

Taking a peak in the compileCommands and cpp_Properties… compileCommands is completely empty


I’ve tried every suggestion I’ve come across so far, from Dan’s swap build tool versions, multiple other forum suggestions, uninstalling/reinstalling VS, VScode, and UE… At this point I feel like I have to be overlooking something extremely obvious? Any help or suggestions would be greatly appreciated

what are the include statements in your MovingPlatform.cpp

i just ran into an error yesterday where something “magically” added an include statement #include <ocidl.h> without me knowing about it.

i had some slightly different errors, but it wouldn’t build, i had the red squiggles everywhere.

the only include in there is
#include "MovingPlatform.h" which it is unhappy about due to dependency of
screenshot below

did it ever build? or is this the first time you’ve tried.

trying to determine if something changed (perms, path, version, or something goofy with some underlying thing), or if there was an issue that has always been there.

disclaimer, I’m new to cpp and ue5, but no stranger to tech or sw dev.

For this particular project? No. It has given the Rules MDL error every time.
This is however the first UE5 project attempted on this machine. Prior to this, I had VS 2019 installed and VScode, then updated to 2022, and after an afternoon of the same issue just kind of nuked it and started from scratch uninstalling/cleaning/reinstalling everything one by one. Same end result/error

So, I’m a fool, but here’s the fix for my version of this issue, specifically for the module rules ‘MDL’ error presenting in both the UE log, and when attempting to Run Build Task
If by chance you have been working with Unreal previously, before migrating to 5, AND using NVIDIA Omniverse, make sure to check that your connectors have been updated. The old connector didn’t flag an update automatically for me, but checking it manually, there was one fixing/changing UE 5 support. After updating the connector, in VScode do the Run Build Task as shown which should be successful now.

However, the #include will still show all the squiggles, ‘cannot open’ errors, and your compileCommands_Default.json may still be empty. Open the project in UE again, Tools > Refresh Video Studio Code Project, and everything seems to be resolved.

Manually check your updates folks. Don’t be me!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms