gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

libobjc2 1.0 - a couple of problems


From: Pete French
Subject: libobjc2 1.0 - a couple of problems
Date: Tue, 05 Oct 2010 16:56:01 +0100

Just playing around with this now on FreeBSD, and came across
a couple of curiosities. Firstly, the code only compiles with
clang, not with gcc. When I try it I get these errors...

selector_table.c: In function 'add_selector_to_table':
selector_table.c:244: warning: passing argument 2 of 'selector_insert' discards 
qualifiers from pointer target type
selector_table.c:246: error: assignment of read-only location
selector_table.c: In function 'register_selector_locked':
selector_table.c:266: error: assignment of read-only location
selector_table.c:267: error: assignment of read-only location
selector_table.c:277: error: assignment of read-only location
selector_table.c: In function 'objc_register_selector':
selector_table.c:309: error: assignment of read-only location
selector_table.c: In function 'objc_register_selector_copy':
selector_table.c:339: error: assignment of read-only location
selector_table.c:340: error: assignment of read-only location
*** Error code 1

Secondly, I use static libraries - this will not link unless -fPIC is
applied to the CFLAGS. There is no problem with the shared libraries,
only the static ones.

Adding -fPIC and compiling with clang works fine however.

cheers,

-pete.

PS: could we have the static library stuff added to the Makefile ? It's
only three additiuonal lines and one change.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]