On Fri, Aug 20, 2010 at 5:41 PM, EBo <e...@sandien.com> wrote:
>
>
>> i guess you answered that yourself. does p9p run on Plan 9?
>
> There a plenty of programs which are made to run under both p9p and plan9.
> So, no the question is still open, but I will rephrase it.
>
> Should any program which can run under p9p and plan9 ever be compiled with
> g++ or another c++ compilers?  Otherwise is it necessary to check for
> __cplusplus?
>

what I meant was that p9p is used on unix-like systems.
with that in mind, what if i wanted to:

% cat a.cc
#include <iostream>
#undef _XOPEN_SOURCE
#define NOPLAN9DEFINES
#include <u.h>
#include <libc.h>
#include <draw.h>
#include <geometry.h>

int
main(void)
{
        Point3 x = {1,0,1}, y = {0,1,1}, z;
        z = add3(x,y);
        std::cout << z.x << std::endl;
        std::cout << z.y << std::endl;
        std::cout << z.z << std::endl;
        return 0;
}

% g++ -I$PLAN9/include -c a.cc && g++ -o a a.o $PLAN9/lib/libgeometry.a
% a
1
1
2

without the extern definitions?
sorry if i was harsh.

Reply via email to