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 compile after add empty .cpp file

Hi,

I have a C++ project that I use to test some libraries before adding them to my main project. I currently work with a noise library, that works pretty well in a small project. But I have a problem when I add more than 31 .cpp files in my project : the compiler does not compile correctly the library and shows incoherent errors.

To target the problem, I have created 2 projects, one with the library + 23 empty .cpp files, and another with the library + 24 empty .cpp files (I use empty .cpp files just to demonstrate the problem). The first project compiles normally, they are lots of warning but i can use the lib normally. But the second can not compile at all. If you remove one of the empty .cpp files that I put into the project, it will compile.

This is my 2 projects :

OK-Project

FAIL-Project

They are very light projects so you can test yourself by downloading them and generate VS project files (by right-clicking on the .uproject) and try to compile them in VS. I tested them on two different computers, with different installations, with UE 4.21 and 4.19, and the problem is the same.

So what am I missing? It seems that the compiler compiles differently when a project contains more than 31 .cpp files.

Product Version: UE 4.21
Tags:
more ▼

asked Mar 22 '19 at 02:32 AM in C++ Programming

avatar image

Zbluu
1 2 3

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

1 answer: sort voted first

The answer was to disable the unity build.

more ▼

answered Apr 18 '19 at 10:23 AM

avatar image

Zbluu
1 2 3

(comments are locked)
10|2000 characters needed characters left
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