x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Intellisense can't find includes for UE4 project

I'm quite new to UE4 and I'm trying to look through the code to figure out how to get multiple monitors working (I know - deep end) but I find it nearly impossible to do it without intellisense to allow me to go to definitions etc.

Because UE4 uses CMake (or something like that), it doesn't use the standard includes mechanism VS expects, and because all the paths for includes are not relative to the project or solution intellisense can't find any header files to build its database. I tried including some additional folders, which solved a few of the lookups, but there are so many folders i can't put them all in the included folders list (and that seems like bad practice anyway).

I'm sure there must be some easy/obvious thing i'm completely unaware of as surely all the UE devs in the world don't have to cope without intellisense for the massive codebase all the time.

If someone could explain to me how the CMake build mechanism works with VS, that would really help. I looked through the project properties, but the NMake page doesn't really help me.

Product Version: UE 4.7
Tags:
more ▼

asked Jun 17 '15 at 02:24 PM in C++ Programming

avatar image

Nintynuts
56 4 5 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hello, Nintynuts

To fix the issue, please disable IntelliSense in Visual Studio. For this, please go to Tools - Text Editor - C/C++ - Advanced - IntelliSense and use the settings as shown below: alt text

If you like to learn more about setting up Visual Studio for Unreal Engine 4 (including additional extensions), please go here:

https://docs.unrealengine.com/latest/INT/Programming/Development/VisualStudioSetup/index.html

Hope this helped!

Have a great day!

more ▼

answered Jun 17 '15 at 03:20 PM

avatar image

Andrii Melnyk
1.9k 60 20 112

avatar image Nintynuts Jun 17 '15 at 05:10 PM

This doesn't solve my issue, and it seems presumptuous for you to mark it resolved on my behalf.

First of all what you're showing me is the default settings where intellisense is on still, not off (so your picture doesn't illustrate your 'solution') and secondly, this doesn't make intellisense work, it turns it off completely. You seem to have used the image from the documentation for turning it back on, just below the text that reads "UE4 projects now have proper IntelliSense support, including a live Error List and "squiggles"! (See below for how to enable it.)"

If you read my question you would know that I want it on and working to help me find my way through UE4's massive code base. If this is your way of telling me intellisense CAN'T work with UE4, then I'm kind of appalled that's the case, especially as the documentation says it can.

avatar image BunniPhD Jul 16 '15 at 03:03 AM

Hey there, yeah I agree. Do not disable Intellisense, doing so is essentially reverting us to the age of VI and spamming make compile, to trial-and-error for compile errors.

->> PURE SPECULATION: A guess at the how, from what I can tell (i.e. my educated guess) UE4's build tool seems to enumerate the files given via the include paths in your Project.Build.cs, and internally handles the includes and calling the make tool on each and or throws everything into a moshpit.

A guess at the why: it was probably done a while ago (i.e. UE3 or earlier) to ease the headache of include paths for cross referenced / inter-dependent projects / modules / libraries. I.E. note how you selectively include modules in your Project.Build.cs, imagine old school of adding paths of desired modules to your compiler's and linkers include list. Additionally, the automated build tool's code is likely eased a great deal in complexity, as a result. All-in-all, it cannot be removed, as it would wreck havoc in terms of backwards compatibility and alter the way we compile and maintain projects (and certainly break the automated build tool).

END SPECULATION <<-

As for how to fix it, I've not found a practical way. Intellisense compatibility does not seem to be a priority for Epic. Personally, I just ignore the Intellisense include error and occasionally just uncheck Intellisense errors from appearing in the error list (right click in the error window and uncheck "show Intellisense errors"). Intellisense in UE4 projects will just simply not work up to par as it normally does...

I (and from what I gather, a lot of other UE4 c++ programmers) use VAssistX to supplement intellisense, and it works well enough. VAssistX pre-scans your solution and holds symbols internally (rather than trying to lookup through includes) so it gets around UE4's nonsense include path method.

Otherwise, welcome to the nightmare of programming in UE4's version of C++ (does not play well with advanced IDE's). :(.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question