From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23701 invoked by alias); 29 Oct 2010 14:12:48 -0000 Received: (qmail 23690 invoked by uid 22791); 29 Oct 2010 14:12:47 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,MISSING_MID,TW_BJ X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 29 Oct 2010 14:12:43 +0000 From: "ktietz at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libobjc/39465] libobjc does not find classes of DLLs X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libobjc X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ktietz at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Fri, 29 Oct 2010 14:12:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-10/txt/msg02494.txt.bz2 Message-ID: <20101029141200.ldrXny6jgBrgL38ymLflZtrgKg6E6Ofj-ycvADsIKVI@z> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39465 Kai Tietz changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ktietz at gcc dot gnu.org --- Comment #16 from Kai Tietz 2010-10-29 14:12:26 UTC --- (In reply to comment #15) > After looking some more at the code, I might have an idea what's causing the > issue: > __objc_gnu_init calls __objc_exec_class on _OBJC_MODULES. Is it possible that > this call is not made for some reason if you link your lib as a dll? That would > mean the classes are never loaded into the runtime. I did recently some bugfix for libobjc (shared) for the version in gcc's source tree. Issue was that the DLL generation was pretty broken in different ways, which lead then to the issue that no function was exported by it. This should be fixed on 4.6 version and initial tests are showing it works for me now. But in general it is wise to use - if building shared libraries for win32 targets - to use instead of the dllexport/dllimport mechanism the linker option --export-all-symbols. The issue for obj-c is, that class can't have dllimport/dllexport attributes, which cause then that their names can't be found. I hope it helps, Kai