From owner-freebsd-hackers Wed May 31 10:28:51 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from ludwig.troikanetworks.com (host03.troikanetworks.com [12.31.172.3]) by hub.freebsd.org (Postfix) with ESMTP id E799837BE0B for ; Wed, 31 May 2000 10:28:45 -0700 (PDT) (envelope-from noone@nowhere.com) Received: from stout.troikanetworks.com (host65.troikanetworks.com [12.31.172.65]) by ludwig.troikanetworks.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id LYY76HJR; Wed, 31 May 2000 10:28:51 -0700 From: Kevin Bailey To: freebsd-hackers@freebsd.org Subject: Instantiating templates with -frepo ? Date: Wed, 31 May 2000 09:52:35 -0700 X-Mailer: KMail [version 1.0.29.1] Content-Type: text/plain MIME-Version: 1.0 Message-Id: <00053110270200.78429@stout.troikanetworks.com> Content-Transfer-Encoding: 8bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Does anyone know how to get -frepo working with g++ ? This is what I get when I compile the attached program: % g++ -c -frepo temptest.cpp % g++ -frepo temptest.o temptest.o: In function `main': temptest.o(.text+0x57): undefined reference to `void printit(ClassA &)' Here are the versions of the programs. As you can see, I've 'upgraded' to binutils-2.9.1.0.25 without it making a difference. This is on FreeBSD 4.0. % g++ -v Using builtin specs. gcc version 2.95.2 19991024 (release) % ld -v GNU ld version 2.9.1 (with BFD 2.9.1.0.25) P.S. Return address is nonexistent. Please reply to list. /////////////////////////////////////////////////////////// #include template void printit(C& c) { c.print(); } class ClassA { int _x; public: ClassA(int); void print(); }; ClassA::ClassA(int i) { _x = i; } void ClassA::print() { printf("Its %d\n", _x); } main() { ClassA a(10); printit(a); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message