Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.development.apps > #127

Re: Compilation order

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!feeder3.cambriumusenet.nl!feed.tweaknews.nl!217.73.144.44.MISMATCH!ecngs!feeder.ecngs.de!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.lyse.net!news.lyse.net.POSTED!not-for-mail
NNTP-Posting-Date Mon, 30 May 2011 01:56:47 -0500
Date Mon, 30 May 2011 08:56:39 +0200
From David Brown <david@westcontrol.removethisbit.com>
User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10
MIME-Version 1.0
Newsgroups comp.os.linux.development.apps
Subject Re: Compilation order
References <ab6994bc-8b2d-4e9f-8f6c-f756ae1c3fa3@h36g2000pro.googlegroups.com> <NK-dnTy_nOtk1kLQnZ2dnUVZ8kmdnZ2d@lyse.net> <87zkm81d99.fsf@sapphire.mobileactivedefense.com>
In-Reply-To <87zkm81d99.fsf@sapphire.mobileactivedefense.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Message-ID <_YWdnTaLkukyon7QnZ2dnUVZ8g-dnZ2d@lyse.net> (permalink)
Lines 25
X-Usenet-Provider http://www.giganews.com
X-AuthenticatedUsername NoAuthUser
X-Trace sv3-kzINkV6I0OUWfPLQ3InIWw2oEkVTOil6zAsCaBxqnIeWVIsbnoqbcgrnsnynFajw7ZEUrDHEsJX6pJT!UuDuOCAIan0X55S0VUXuJ3k7mfqT53LazxYKCWi7227MYLFCxTZbnknsFuB+69XY2/yl2S/5+Cs7!eoDR
X-Complaints-To abuse@altibox.no
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 2573
Xref x330-a1.tempe.blueboxinc.net comp.os.linux.development.apps:127

Show key headers only | View raw


On 27/05/2011 15:31, Rainer Weikusat wrote:
> David Brown<david@westcontrol.removethisbit.com>  writes:
>> On 27/05/2011 08:06, wij@seed.net.tw wrote:
>>> Hi:
>>> I have a program to update on Fedora 15(g++ version 4.6.0), but
>>> the compiled executable is wrong. Let me make an example. I had
>>> 2 files t1.cpp t2.cpp, t1 contains the main function. If I issue
>>> command "g++ t1.cpp t2.o". A static array in t2.o is not initialized.
>>> The command "g++ t2.o t1.cpp" solves the problem. But on earlier
>>> versions of g++, the same problem happened. In all, with g++ 4.6.0
>>> I should use g++ t2.o t1.cpp, with earlier versions I should use
>>> g++ t1.cpp t2.o. What is the problem and how should I fix it?
>>> Thanks in advance.
>>
>> Don't call g++ directly - always use "gcc", and let it call the
>> required linker or compiler programs as needed.
>
> That's wrong. g++ is the name of the gcc frontend for C++ and it is
> supposed to provide default values that 'work' for this language. It
> is not one of the backends (that would be cc1plus in this case).

Thanks (also to Richard) for correcting me here - I had, as you probably 
suspected, thought g++ was part of the backend rather than the front-end 
here.

Back to comp.os.linux.development.apps | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Compilation order wij@seed.net.tw - 2011-05-26 23:06 -0700
  Re: Compilation order David Brown <david@westcontrol.removethisbit.com> - 2011-05-27 09:00 +0200
    Re: Compilation order Richard Kettlewell <rjk@greenend.org.uk> - 2011-05-27 09:59 +0100
    Re: Compilation order wij@seed.net.tw - 2011-05-27 05:56 -0700
      Re: Compilation order Richard Kettlewell <rjk@greenend.org.uk> - 2011-05-27 14:11 +0100
      Re: Compilation order David Schwartz <davids@webmaster.com> - 2011-05-27 12:23 -0700
        Re: Compilation order wij@seed.net.tw - 2011-05-27 18:56 -0700
          Re: Compilation order David Schwartz <davids@webmaster.com> - 2011-05-27 22:52 -0700
            Re: Compilation order wij@seed.net.tw - 2011-05-28 08:46 -0700
              Re: Compilation order David Schwartz <davids@webmaster.com> - 2011-06-03 04:30 -0700
    Re: Compilation order Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-05-27 14:31 +0100
      Re: Compilation order David Brown <david@westcontrol.removethisbit.com> - 2011-05-30 08:56 +0200
  Re: Compilation order Sergei Organov <osv@javad.com> - 2011-05-27 11:37 +0400
    Re: Compilation order Richard Kettlewell <rjk@greenend.org.uk> - 2011-05-27 10:00 +0100
  Re: Compilation order Jasen Betts <jasen@xnet.co.nz> - 2011-05-29 12:48 +0000

csiph-web