Closed Robmaister closed 3 years ago
I see it's now defined in the editor private PCH, so I'm locally undef-ing it in SNewFilePathPicker.cpp, commenting out the remaining #defines at the top of cpp files, and ensuring all cpp files do not end with an undef
Ok so for most of the cpp files in the HoudiniEngineEditor module, I've commented out the lines:
#include "HoudiniEngineEditorPrivatePCH.h"
because the the compiler/UBT handles this on it's own#define LOCTEXT_NAMESPACE HOUDINI_LOCTEXT_NAMESPACE
because there's already a definition inside the PCH#undef LOCTEXT_NAMESPACE
because the PCH is only included once per unity cpp file, and we want the PCH definition to persist through all of the included cpp files.The only exception is SNewFilePathPicker.cpp, which I've set up as:
#ifdef LOCTEXT_NAMESPACE
#define PREV_LOCTEXT_NAMESPACE LOCTEXT_NAMESPACE
#undef LOCTEXT_NAMESPACE
#endif
#define LOCTEXT_NAMESPACE "SNewFilePathPicker"
// Body of file...
#undef LOCTEXT_NAMESPACE
#ifdef PREV_LOCTEXT_NAMESPACE
#define LOCTEXT_NAMESPACE PREV_LOCTEXT_NAMESPACE
#undef PREV_LOCTEXT_NAMESPACE
#endif
Intellisense will not be happy with the removal of the PCH include, but it will all still compile just fine.
Hi Rob,
As mentioned on the other issue, I found out about these unity build issues after publishing the alpha3 update, and will commit an update for it shortly. The actual fix for this was to remove the #define in the PCH file, and ensure that all cpp files have proper #define and #undef .
Cheers
Just integrated Alpha 3 into our 4.24 project. It looks like there's an inconsistency between master and the 4.24/4.23 branches with the namespace at the top of SNewFilePathPicker.cpp, I get a warning about redefining HOUDINI_LOCTEXT_NAMESPACE. Commented the line out to match up with the master branch.
I also had to add a
#define LOCTEXT_NAMESPACE HOUDINI_LOCTEXT_NAMESPACE
to the top of HoudiniParameterDetails to get rid of errors.Compiling fine otherwise :)
EDIT: Had to change the line at the top of SNewFilePathPicker.cpp to define it as LOCTEXT_NAMESPACE. Guessing the unity build file grouping changed while testing something else and the original namespace was pulled from an earlier cpp file, so there's probably another undef missing somewhere