Can't Recongnize the macro after "class" sometimes in UE4

Normally it could recognize the macro PROJECTNAME_API after class correctly. (template code of Pawn class in UE4 engine)

But it can't sometimes. It recognized PROJECTNAME_API  as a type name(should be a macro) ,  (template code of Actor class in UE4 engine)

so in the .cpp,  true type name can't be recognized...

All code are correct and can compile successfully, but it shows tons of error in editor... 

How can I solve it?

4 comments
Comment actions Permalink

Hello,

Looks like R++ sometimes does not see the PROJECTNAME_API define. Where is this macro defined and how is it visible in BackgroundActor.h?

Please also start Visual Studio with the "/ReSharper.Internal" command-line argument, and the next time there's an error in the header file run "ReSharper | Internal | C++ | Dump inclusion context" and send us the resulting log.

Thanks!

0
Comment actions Permalink

Well, that defined by UE4 engine and I can just find the defination here. 

All I know is every custom class defination require this macro otherwise it can't work in UE4 engine..

 

And I am sorry but how could I start VS with command-line argument and where should I send the log? 

0
Comment actions Permalink

So how does Definitions.DemoFlappyBird.h get included into BackgroundActor.h? Can you perhaps share this project with us?

Re internal mode, just run "devenv.exe /ReSharper.Internal" or add the argument to the VS shortcut. Please attach the log or the project to https://youtrack.jetbrains.com/issue/RSCPP-30288.

0
Comment actions Permalink

Project upload finished. 

But this is an UE4 project,  maybe you have to use UE4.25.1 to run it ... 

0

Please sign in to leave a comment.