9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Peter Bosch <pb@research.bell-labs.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] g++ (plan 9) experience anyone?
Date: Tue, 19 Nov 2002 08:53:04 -0500	[thread overview]
Message-ID: <e76bbe1b2ffcc375b678c3512062da37@plan9.bell-labs.com> (raw)

> I must be missing sthg with g++ ported to p9,

I'm running g++-3.0 here without much problems.  It turned out libstdc++
was not installed correctly and the static constructors are not called on
main.  Here's what I added to my main:

// Ugly, G++ needs to be installed correctly.
void
ctors(void)
{
	typedef void (*func_ptr)(void);
	extern func_ptr ___CTOR_LIST__[];

	for (int i = 0; i != (int)___CTOR_LIST__[0]; i++)
		___CTOR_LIST__[i + 1]();
}

int
main(int argc, char **argv)
{

	ctors();
	...

}

peter.



             reply	other threads:[~2002-11-19 13:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-19 13:53 Peter Bosch [this message]
2002-11-20 16:37 ` Douglas A. Gwyn
  -- strict thread matches above, loose matches on Subject: below --
2002-11-20 17:25 Peter Bosch
2002-11-19  9:24 Petr Cejchan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e76bbe1b2ffcc375b678c3512062da37@plan9.bell-labs.com \
    --to=pb@research.bell-labs.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).