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"

Intermediate directory not included in VisualStudio project generation

Hi! I am trying to include my c++ plugin into my project, but when I "Generate Visual Studio Project Files" the "*.generate" files are created, but not included. I have a Header named "Avatar.h", the "Avatar.generated.h" exists in the "Intermediate" directory, but not found when I include it.

If you know why, I'll be happy to have some help on this. Thanks!

Product Version: UE 4.13
Tags:
more ▼

asked Apr 13 '17 at 02:31 PM in C++ Programming

avatar image

Thiryn
23 2 5

avatar image ExtraLifeMatt Apr 13 '17 at 02:37 PM

Is this file in your project? Or in your plugin?

If it's in your plugin, make sure your public/private include paths (in your PluginName.build.cs) are setup properly (you can look at something like Paper2D.build.cs to see how they have it setup).

avatar image Thiryn Apr 13 '17 at 03:16 PM

It is indeed inside my plugin. My build.cs file is apparently setup properly :

             PublicIncludePaths.AddRange(
                 new string[] {
                     "Public"
                     // ... add public include paths required here ...
                 }
                 );
 
             PrivateIncludePaths.AddRange(
                 new string[] {
                     "Private"
                     // ... add other private include paths required here ...
                 }
                 );

Knowing that I have two folder, Public and Private. The Avatar.h file is in the Public folder.

avatar image ExtraLifeMatt Apr 13 '17 at 03:50 PM

Hmm, and you have the plugin enabled in your Project (you can verify by checking the plugins in the editor)?

Also is your plugin is in the Engine/Plugin directory? If not, try moving it there.

avatar image Thiryn Apr 13 '17 at 04:38 PM

My plugin is enabled. I tried to create a plugin from scratch via the editor (plugins/new plugin/blank), generated the visual studio project files, and I have inclusion problems aswell.

If you try it, in the PluginNamePrivatePCH.h, I have an inclusion error for the "PluginName.h" In the file PluginName.cpp you can see

 #define LOCTEXT_NAMESPACE "FPluginNameModule"
 
 void FPluginNameModule::StartupModule()
 {
     // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module
 }

But, Visual studio triggers an error on FPluginNameModule::StartupModule() because "name followed by :: must be a class or a namespace name" All these files being generated. I think all these inclusion problems are related...

EDIT : I thought it could be a problem of dynamically generated files by UE (why not..?), so I build the game (via the UE plugin in Visual Studio) and the problem is still here

avatar image ExtraLifeMatt Apr 13 '17 at 04:49 PM

The include directories are completely driven by the .Build.cs files. You should be able to go into your project properties in VS and look at all the additional include directories/intermediate directories it lists and see where the discrepancy is.

avatar image Thiryn Apr 14 '17 at 11:49 AM

Thank you, I did not spot the problem, but restarting a plugin with some content via the editor worked for me.

(comments are locked)
10|2000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
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