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"

Including "StaticMesh.h" breaks my code

HI guys,

I'm trying to use a staticmesh in my component class. The issue is that its undefined unless I include the header(duh). But when I include the header it throws an error in an unrelated file.

D:\Unreal Engine\UnrealEngine\Engine\Source\Runtime\CoreUObject\Public\UObject/UObjectIterator.h(37): error C2660: 'GetObjectW': function does not take 0 arguments

I've not touched that file in any way. So how do I properly include StaticMesh.h?

My cpp file is in "Engine/source/Runtime/Engine/Classes/Components"

Product Version: UE 4.18
Tags:
more ▼

asked Jan 12 '18 at 04:34 PM in C++ Programming

avatar image

Rynold
56 8 9 15

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

1 answer: sort voted first

Alright, I figured it out. The order you put the includes matter. I had my include closer to the bottom of my include list. When I moved it to the top I can build without errors now.

If anyone could elaborate on why that solved this problem that would be great though.

more ▼

answered Jan 12 '18 at 05:14 PM

avatar image

Rynold
56 8 9 15

(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