"Cannot create __weak reference in file using manual reference counting"

964 views
Skip to first unread message

an...@laundrapp.com

unread,
Mar 22, 2016, 8:14:06 AM3/22/16
to j2objc-discuss
Hi,

Some generated code is adding this "__weak" reference while creating the code for manual reference counting.

Apparently since xCode 7.3 came out this now creates a build error.

Is there a specific reason for that reference to be there, and will it be safe to remove all those "__weak" from the code in a pos translation script?

Thanks in advance,
Andre

Keith Stanger

unread,
Mar 22, 2016, 9:18:32 AM3/22/16
to j2objc-discuss
This should be fixed in 1.0.1. We've changed __weak annotations to __unsafe_unretained in this commit.

--
You received this message because you are subscribed to the Google Groups "j2objc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to j2objc-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

dmitri...@gmail.com

unread,
Mar 28, 2016, 2:36:57 PM3/28/16
to j2objc-discuss
If you want to keep converted code for some reason and use it with Xcode 7.3, just replace __week in J2ObjC_header.h with __unsafe_unretained. It will fix the error.

Regards,
Dmitrijs

Tom Ball

unread,
Mar 28, 2016, 11:20:00 PM3/28/16
to j2objc-discuss
Good suggestion, but don't ask for support for saved code. The tool was designed to be a compiler, and we don't have the resources for other uses.
Reply all
Reply to author
Forward
0 new messages