Path: csiph.com!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!buffer1.nntp.ams1.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail NNTP-Posting-Date: Sat, 14 Jan 2017 07:26:22 -0600 From: Gareth Owen Newsgroups: comp.lang.c Subject: Re: Naming convention for structs and types References: <13ae9e88-30fd-4c3d-9427-51eea224fa77@googlegroups.com> <5f80f737-f90a-41c9-9ffd-b82ae919840d@googlegroups.com> <87fuklq3rz.fsf@gmail.com> Date: Sat, 14 Jan 2017 13:26:22 +0000 Message-ID: <87bmv9pybl.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cancel-Lock: sha1:SHAGn5eVx5rga4hN4vYPT39pZUk= MIME-Version: 1.0 Content-Type: text/plain Lines: 38 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-uET+ohjTsGjwHj2rLaYc0slXc6+J+4oQSvFT7XmkrPjn5/a+Ad00V+7UR7Wd2fhWShPxz75JKzNroVU!jCUlgm57FYmZ7FPWhjfbNUaFhmYX5/t6/4/jX3PHtfxyDodDKomZ24Y+FyetIzbwSeiSug== X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2712 Xref: csiph.com comp.lang.c:101751 BartC writes: >>Just writing a simple C++ hello world program >> and then doing >> >> CC helloWorld.cc > >>will be linking C and C++ libraries. ... it just works. > > Obviously it didn't. He said CC. You typed cc. Do you see the difference? CC is a common name for a C++ compiler. (Not on your system, though) cc is a common name for a C compiler. (Including your system). Do you see the difference? You assumed that he meant cc, and then told him he was wrong. > I tried it out because I was puzzled by the use of the .cc extension, > and was wondering why he would use what looks like a C compiler (even > I can vaguely recall cc from Unix) But not CC, evidently. That you assumed they were the same is you problem, not his. As I said, your problem was not knowing that CC is a C++ compiler. > on what he said was C++ code. So, guess what tool he used to build it. Clue - not cc, the C compiler. > And even if somehow CC had worked and managed to produce an > executable, I still don't see how this is linking a C library, as the > program makes use of std::cout. Because the startup code will be a C library, and that will be linked too. Because Unix kernels us the C-library-entry-point to start code.