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"

Can't add C++ class in my existing blueprint project

This is the error I get:

alt text

In text:

 ERROR: f:\Unreal Engine Projects\BoxMobile\Intermediate\Source\BoxMobile.Target.cs(6,14) : error CS0101: De naamruimte <globale naamruimte> bevat al een definitie voor BoxMobileTarget
 ERROR: UnrealBuildTool Exception: Unable to compile source files.

globale naamruimte is a global namespace, it says that it already contains a definition for BoxMobileTarget.

I never added a C++ class before though.

How do I fix it?

Product Version: UE 4.19
Tags:
more ▼

asked Jan 10 '19 at 04:44 AM in C++ Programming

avatar image

MrGoatsy
604 34 26 44

avatar image plangton Jan 10 '19 at 12:12 PM

Maybe there is such a class name n the engine. can you create a class with another random name?

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

1 answer: sort voted first

I found out what is your issue.

Okay so the name of your project is "BoxMobile" Unreal engine always creates a class name ProjectName+Target. in your case it is BoxMobileTarget. it is kept in the source directory . under ProjectName.Target.cs and it takes care compilation specific features of your project. it is a C# file but still, you can't have a class with the same name.

Another class that will be created automatically is ProjectName+Editor+Target which in your case is "BoxMobileEditorTarget"

In short, you need to use another name

more ▼

answered Jan 10 '19 at 01:03 PM

avatar image

plangton
357 17 20 31

(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