public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libobjc/39465]  New: libobjc does not find classes of DLLs
@ 2009-03-15 15:34 gcc-bugzilla at gcc dot gnu dot org
  2009-03-16  7:27 ` [Bug libobjc/39465] " ayers at gcc dot gnu dot org
                   ` (13 more replies)
  0 siblings, 14 replies; 17+ messages in thread
From: gcc-bugzilla at gcc dot gnu dot org @ 2009-03-15 15:34 UTC (permalink / raw)
  To: gcc-bugs


        When building a program that uses an objc library as a DLL, libobjc
        can't find its classes. When the program and the library are statically
        linked, it works.
        My libobjc itself is linked as a static library.

Environment:
System: Linux asgard.webkeks.org 2.6.28.5 #1 SMP Sat Feb 14 14:16:10 CET 2009
i686 Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz GenuineIntel GNU/Linux



host: mingw32
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc-4.3.0-20080502/configure -v --prefix=/usr
--libexecdir=/usr/lib --program-prefix=mingw32- --target=mingw32
--with-headers=/usr/mingw32/include --without-x --disable-nls
--disable-win32-registry --disable-shared --disable-java-awt
--disable-libgcj-debug --with-gcc --with-gnu-ld --with-gnu-as --enable-threads
--enable-languages=c,c++,objc --enable-libgcj --enable-java-gc=boehm
--enable-interpreter --enable-hash-synchronization --enable-libstdcxx-debug

How-To-Repeat:
        asgard:/tmp$ cat foo.h
        #import <objc/Object.h>

        @interface MyObj: Object
        - (void)foo;
        @end
        asgard:/tmp$ cat foo.m
        #import <stdio.h>

        #import "foo.h"

        @implementation MyObj
        - (void)foo
        {
                puts("foo!");
        }
        @end
        asgard:/tmp$ cat test.m
        #import "foo.h"

        int main()
        {
                MyObj *x = [MyObj new];
                [x foo];
                return 0;
        }
        asgard:/tmp$ mingw32-gcc -shared -Wl,--out-implib,libfoo.dll.a foo.m -o
libfoo.dll -lobjc
        asgard:/tmp$ mingw32-gcc -L. test.m -lfoo -lobjc
        Info: resolving ___objc_class_name_MyObj by linking to
__imp____objc_class_name_MyObj (auto-import)
        /usr/lib/gcc/mingw32/4.3.0/../../../../mingw32/bin/ld: warning:
auto-importing has been activated without --enable-auto-import specified on the
command line.
        This should work unless it involves constant data structures
referencing symbols from auto-imported DLLs.
        asgard:/tmp$ wine a.exe
        objc runtime: cannot find class MyObj


------- Comment #1 from js-gcc at webkeks dot org  2009-03-15 15:34 -------
Fix:
        I guess some change to libobjc is needed so it can find classes inside
        DLLs.


-- 
           Summary: libobjc does not find classes of DLLs
           Product: gcc
           Version: 3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libobjc
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: js-gcc at webkeks dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: mingw32
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39465


^ permalink raw reply	[flat|nested] 17+ messages in thread
[parent not found: <bug-39465-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2010-11-03 17:11 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-15 15:34 [Bug libobjc/39465] New: libobjc does not find classes of DLLs gcc-bugzilla at gcc dot gnu dot org
2009-03-16  7:27 ` [Bug libobjc/39465] " ayers at gcc dot gnu dot org
2009-03-16 11:24 ` js-gcc at webkeks dot org
2009-03-16 11:41 ` ayers at gcc dot gnu dot org
2009-03-16 11:46 ` js-gcc at webkeks dot org
2009-03-16 23:51 ` ayers at gcc dot gnu dot org
2009-03-17 14:05 ` js-gcc at webkeks dot org
2009-04-06 19:41 ` js-gcc at webkeks dot org
2009-04-06 21:22 ` ayers at gcc dot gnu dot org
2009-04-06 21:39 ` js-gcc at webkeks dot org
2009-04-06 21:59 ` ayers at gcc dot gnu dot org
2009-06-09 19:17 ` js-gcc at webkeks dot org
2009-06-09 19:27 ` js-gcc at webkeks dot org
2009-07-16 21:16 ` js-gcc at webkeks dot org
2009-12-20  0:31 ` js-gcc at webkeks dot org
     [not found] <bug-39465-4@http.gcc.gnu.org/bugzilla/>
2010-10-29 14:12 ` ktietz at gcc dot gnu.org
2010-11-03 17:11 ` rwild at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).