Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!ut-sally!im4u!milano!mcc-pp!ables From: ables@mcc-pp.UUCP (King Ables) Newsgroups: net.lang.c++ Subject: multiply defined symbols when using complex math library Message-ID: <383@mcc-pp.UUCP> Date: Sat, 3-May-86 23:36:29 EDT Article-I.D.: mcc-pp.383 Posted: Sat May 3 23:36:29 1986 Date-Received: Tue, 6-May-86 06:15:51 EDT Organization: MCC, Austin, TX Lines: 52 I wonder if anyone has seen quite this reaction before? I've just installed C++ on an 11/750 running 4.2BSD. It seems to work for the generic Hello-world kind of program and a few others around here. However, I've been trying to get the example complex math program to compile and get multiply defined symbols. I'm afraid that's indicative of other subtle problems we might have. On page 1 of PART TWO of the Release notes for 1.0, there's a short program example (this is at the beginning of a paper on Complex Arithmetic in C++): #include main() { complex xx; complex yy = complex(1,2.718); xx = log (yy/3); cout << 1+xx; } So I took the program and compiled it according to the instructions back in the section called "Technical Tips" on page 5-4: CC test.c -lC -lm and I get: CC t.c: cc t..c -lC -lm -lC __ctors: ld:__ctdt.o: multiply defined __dtors: __ctdt.o: multiply defined I've broken things down to a pretty low level but don't see why things are happening like they are. Has anybody else tried this program or had this problem? Thanks for any info. Also, I'm trying to make a (hopefully) fool-proof list of what needs to be done to install C++ on a 4.2BSD system. If I ever convince myself I understand it fully and really have it right, I'll post it. In the mean time, if you're having trouble, I'll be glad to send what I have so far. It's mostly made up of info from net.lang.c++ and the README that comes with the tape. There are a couple of things I've found, too. The main use it has is it's ordered... do this, then do this, then do this, instead of just "here's what's wrong in a fairly random order and in seventeen different places!" -King ARPA: ables@mcc.arpa UUCP: {gatech,ihnp4,nbires,seismo,ucbvax}!ut-sally!im4u!milano!mcc-pp!ables --- All things considered, insanity may be the only reasonable alternative.