-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
version: RNW 61-stable
App.cpp:
#include "SomeModule.h"
// ...
//use something/SomeStatic/Global from someModule.h
// etc...
SomeModule.h:
REACT_STRUCT(someStruct)
struct someStruct{
REACT_FIELD(someField)
std::string someField;
}
REACT_MODULE
...
// use someStruct
...etc...
When compiling, it gives errors that someStruct was already defined in app.obj and it gets unhappy.
There are some internal reasons we needed to include SomeModule.h in App.cpp for the time being to work around another issue (sneak in the LaunchActivatedEventArgs from App::OnLaunched).
Note: We aren't instantiating a copy of the module or anything, just needed access to a static function.
Known workaround:
I can create a secondary SomeModuleProxy.h to move a few things of why we needed to include this module header in app.cpp but I feel REACT_STRUCT and REACT_FIELDS should be more resilient to such issues.