Hi all,

I’ve started looking into building libs-gui for Windows using libobjc2 and the 
MSVC ABI, and I’m down to one linker error that I’m unsure how to deal with:

> lld-link: error: undefined symbol: __objc_ivar_offset_NSFileWrapper._icon.☺
> >>> referenced by NSFileWrapperExtensions.m:42
> >>>               
> >>> NSFileWrapperExtensions.m.o:(_i_NSFileWrapper_NSExtensions_setIcon_)

It seems that GUI defines an NSFileWrapper category that accesses an instance 
variable defined in Base here, and that results in this linker error. The class 
definition in Base is correctly annotated with __declspec(dllexport).

Is ivar access across library boundaries maybe unsupported with this setup? If 
so would it be ok to implement -icon/-setIcon: in Base and only expose it in 
the header in GUI?

Thanks,
Frederik


Reply via email to