premake / premake/premake-core

Lost Intellisense after reorganizing project

Open
#1,897 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

support-request
Dominant language
C
Stars
3.6k
Forks
654
Avg merge
1d 1h
Merged PRs (30d)
13

Description

Hi! I just used premake5 beta1 to organize my recent project and even though the structure is as desired and no linking errors manifest out of nowhere, i suddenly lost intellisense and colors of certain variables to all included files. Moreover, when i try to add a new class item, i get a message like "{DirPath}/foo.h is not in project" and creates only the header file on the root project directory. What do I do wrong?
Here is the premake5.lua:

workspace "VolumeInspector"

    architecture "x64"

    configurations
    {
        "Debug",
        "Release"
    }

outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"

project "VolumeInspector"
    kind "ConsoleApp"
    language "C++"

    targetdir ("bin/" ..outputdir.. "/%{prj.name}")
    objdir ("bin-int/" ..outputdir.. "/%{prj.name}")

    files
    {
        "main.cpp",
        "src/Engine/Core/**.h",
        "src/Engine/Core/**.cpp"
    }

    includedirs
    {
        "External/spdlog/include"
    }

    filter "system:windows"
        cppdialect "c++17"
        staticruntime "on"
        systemversion "latest"

    filter "configurations:Debug"
        defines "DEBUG"
        symbols "on"

    filter "configurations:Release"
        defines "NDEBUG"
        optimize "on"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the provided premake5.lua and reproduce the project generation using premake5 beta1. Inspect the generated project files and IDE behavior around the src/Engine/Core/**.h and **.cpp entries, then verify that included files provide IntelliSense and that new classes are created in the project directory.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, lua
Domain
build-system, developer-experience
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.