jsoysouvanh / Refureku

Cross-platform C++17 Runtime Reflection Library
https://jsoysouvanh.github.io/Refureku/
MIT License
218 stars 21 forks source link

No fields found in struct (again) #9

Closed exuvo closed 2 years ago

exuvo commented 2 years ago

I updated to refureku 2.x from 1.x and i couldn't quite get the generator to identify my structs for parsing without using shouldParseAllStructs = true.

I updated my RefurekuSettings with the new changes, it is correctly identifying the files to parse and is outputting the rfk[h/s].h files but it is ignoring all my structs and fields i.e. Found 0 namespace(s), 0 struct(s), 0 classe(s) and 0 enum(s)..

I was using ParseAllNested from Refureku/NativeProperties.h which now seems to be in namespace kodgen::ParseAllNested (not rfk as the changelog suggests) but that did not help. Even basic RFKStruct() and RFKField() was still giving me 0 found.

After i had written out a lot of info here i found the problem, RFKStruct is case sensitive and i wrote it all uppercase in structMacroName = "RFKSTRUCT" when i was moving stuff over from the new config. With that case fixed and using kodgen::ParseAllNested it is now working again.