🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #46416

Problems with Objective-C in version 2.6.0

#46416
From: Torsten Hilbrich
Date: Thu, 24 Nov 1994 11:57
32 lines
1469 bytes
(sorry for posting it two both gnu.*.help, I don't know where objective-c
 related problems are discussed)

When I try to link the compilation of the following program with libobjc.a:

(file test.m)

	#include <objc/Object.h>

	int main()
	{
	  id test = [[Object alloc] init];
	  return 0;
	}

I get error messages about unresolved references:

test.m(.ctor+0x0): undefined reference to 'global constructors keyed to main'
object.m(.ctor+0x0): undefined reference to 'global constructors keyed to \
object.m'

I'm using MS-DOS version of gcc 2.6.0

Here my questions:

- Is there a workaround to this problem?
- If this problem solved in later versions, where can I get MS-DOS
  _BINARIES_ of them?

Thanks in advance for your answers,

	Torsten
Technical Details
Message-ID: <3b1v2d$73b@hahn.informatik.hu-berlin.de>
Path: arc1-ca.pugleaf.net!nntp.gmd.de!newsserver.jvnc.net!howland.reston.ans.net!pipex!uunet!zib-berlin.de!hahn.informatik.hu-berlin.de!hilbrich

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,5d91b47f6f12761a,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1994-11-24 04:55:57 PST
Path: arc1-ca.pugleaf.net!nntp.gmd.de!newsserver.jvnc.net!howland.reston.ans.net!pipex!uunet!zib-berlin.de!hahn.informatik.hu-berlin.de!hilbrich
From: hilbrich@informatik.hu-berlin.de (Torsten Hilbrich)
Newsgroups: gnu.gcc.help
Subject: Problems with Objective-C in version 2.6.0
Followup-To: gnu.g++.help
Date: 24 Nov 1994 11:57:00 GMT
Organization: Humboldt University Berlin, Department of Computer Science
Lines: 32
Message-ID: <3b1v2d$73b@hahn.informatik.hu-berlin.de>
NNTP-Posting-Host: ricker.informatik.hu-berlin.de