UBT Error: If class and folder name are the same

I had a file structure like this

Classes
  DynamicLevels (folder)
    DynamicLevels.h
private
  DynamicLevels (folder)
    DynamicLevels.cpp

I got a UBT error as a result and it would not compile

(sorry I dont have the error any more but it is easy to reproduce I am sure)

and if you cant reproduce it, well then its not an issue

but can you look into this and see if there’s a way around this?

Thanks!

Rama

Hi Rama,

This might be a bug in UHT. That being said, the Classes folder is now deprecated. You can put classes into Public (and Private) directly. This should work as of 4.1, although there were a few bugs that may or may not affect your use case. Those were recently fixed and will make it into 4.2.

Give that a shot and see if it works better, thanks!

“That being said, the Classes folder is now deprecated. You can put classes into Public (and Private) directly. This should work as of 4.1, although there were a few bugs that may or may not affect your use case. Those were recently fixed and will make it into 4.2.”

ooh wow!

Thank you very much for the info Gerke Preussner!

#:heart:

Rama

I didn’t see any notice on that on 4.1 release notes.
Does that means that the standard is now:
Header file in Public and cpp file in private ?

And you can have some private header file for your module in private folder also.

Is that right?

That is correct. In 4.2 the new class wizard will even add classes like that by default providing you’re using a Public/Private folder layout :slight_smile:

If your UClasses do not need to be available to any other modules (internal use only), then you should put the .h file into the Private folder as well.

The Public folder is for files that you want others to be able to see.