* Re: [9fans] g++ (plan 9) experience anyone?
@ 2002-11-19 13:53 Peter Bosch
2002-11-20 16:37 ` Douglas A. Gwyn
0 siblings, 1 reply; 4+ messages in thread
From: Peter Bosch @ 2002-11-19 13:53 UTC (permalink / raw)
To: 9fans
> 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9fans] g++ (plan 9) experience anyone?
2002-11-19 13:53 [9fans] g++ (plan 9) experience anyone? Peter Bosch
@ 2002-11-20 16:37 ` Douglas A. Gwyn
0 siblings, 0 replies; 4+ messages in thread
From: Douglas A. Gwyn @ 2002-11-20 16:37 UTC (permalink / raw)
To: 9fans
Peter Bosch wrote:
> static constructors are not called on main.
The usual practice is to use a crt0 module that calls them.
This should be in the C++ system library.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9fans] g++ (plan 9) experience anyone?
@ 2002-11-20 17:25 Peter Bosch
0 siblings, 0 replies; 4+ messages in thread
From: Peter Bosch @ 2002-11-20 17:25 UTC (permalink / raw)
To: DAGwyn, 9fans
> Peter Bosch wrote:
>> static constructors are not called on main.
>
> The usual practice is to use a crt0 module that calls them.
> This should be in the C++ system library.
yes.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [9fans] g++ (plan 9) experience anyone?
@ 2002-11-19 9:24 Petr Cejchan
0 siblings, 0 replies; 4+ messages in thread
From: Petr Cejchan @ 2002-11-19 9:24 UTC (permalink / raw)
To: 9fans
Hi,
I must be missing sthg with g++ ported to p9,
look:
gnu/g++ -c -B -D_PLAN9 -I
/sys/src/gnu/gcc-3.0/i386-lucent-plan9/libstdc++-v3/include/backward/
-I /sys/src/gnu/gcc-3.0/i386-lucent-plan9/libstdc++-v3/include/ -I
/sys/src/gnu/gcc-3.0/i386-lucent-plan9/libstdc++-v3/include/std/ -I
/sys/src/gnu/gcc-3.0/i386-lucent-plan9/libstdc++-v3/include/c/ -I
/sys/src/gnu/gcc-3.0/i386-lucent-plan9/libstdc++-v3/include/c_shadow/
util.C In file included from util.h:4,
from util.C:1:
/sys/src/gnu/gcc-3.0/i386-lucent-plan9/libstdc++-v3/include/c_shadow/math.h:46:
`abs'
not declared
/sys/src/gnu/gcc-3.0/i386-lucent-plan9/libstdc++-v3/include/c_shadow/math.h:47:
`acos'
not declared
/sys/src/gnu/gcc-3.0/i386-lucent-plan9/libstdc++-v3/include/c_shadow/math.h:48:
`asin'
[... snip ...]
In file included from
/sys/src/gnu/gcc-3.0/i386-lucent-plan9/libstdc++-v3/include/bits/fpos.h:39,
from
/sys/src/gnu/gcc-3.0/i386-lucent-plan9/libstdc++-v3/include/bits/std_iosfwd.h:41,
from
/sys/src/gnu/gcc-3.0/i386-lucent-plan9/libstdc++-v3/include/bits/std_ios.h:39,
from
/sys/src/gnu/gcc-3.0/i386-lucent-plan9/libstdc++-v3/include/bits/std_ostream.h:39,
not declared
/sys/src/gnu/gcc-3.0/i386-lucent-plan9/libstdc++-v3/include/c_shadow/math.h:48:
`asin'
[... snip ...]
In file included from
/sys/src/gnu/gcc-3.0/i386-lucent-plan9/libstdc++-v3/include/bits/fpos.h:39,
from
/sys/src/gnu/gcc-3.0/i386-lucent-plan9/libstdc++-v3/include/bits/std_iosfwd.h:41,
from
/sys/src/gnu/gcc-3.0/i386-lucent-plan9/libstdc++-v3/include/bits/std_ios.h:39,
from
/sys/src/gnu/gcc-3.0/i386-lucent-plan9/libstdc++-v3/include/bits/std_ostream.h:39,
from
/sys/src/gnu/gcc-3.0/i386-lucent-plan9/libstdc++-v3/include/bits/std_iostream.h:40,
from
/sys/src/gnu/gcc-3.0/i386-lucent-plan9/libstdc++-v3/include/backward/iostream.h:32,
from util.h:5,
from util.C:1:
/sys/src/gnu/gcc-3.0/i386-lucent-plan9/libstdc++-v3/include/bits/c++io.h:43:
syntax error before `;' token
[... snip ...]
Cheers,
++pac.
--
---
Zajímavé reklamní produkty, výhodná cena, cílení na uživatele
...http://reklama.volny.cz
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-11-20 17:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-19 13:53 [9fans] g++ (plan 9) experience anyone? Peter Bosch
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
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).