9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Iruatã Souza" <iru.muzgo@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] source header question
Date: Fri, 20 Aug 2010 19:33:11 -0300	[thread overview]
Message-ID: <AANLkTi=zkPJy3MnAhtciDXxt64hPDWe5NDnGO7qd_9it@mail.gmail.com> (raw)
In-Reply-To: <8b002e3d2f652e7a441fb8044b160ceb@swcp.com>

On Fri, Aug 20, 2010 at 5:41 PM, EBo <ebo@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.



  parent reply	other threads:[~2010-08-20 22:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-20 18:29 EBo
2010-08-20 20:28 ` Iruatã Souza
2010-08-20 20:41   ` EBo
2010-08-20 21:05     ` Devon H. O'Dell
2010-08-20 21:14       ` EBo
2010-08-20 21:56       ` Lyndon Nerenberg
2010-08-20 22:05         ` Devon H. O'Dell
2010-08-21 13:21         ` erik quanstrom
2010-08-20 22:33     ` Iruatã Souza [this message]
2010-08-20 22:42       ` EBo
2010-08-21  2:24 ` Russ Cox

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='AANLkTi=zkPJy3MnAhtciDXxt64hPDWe5NDnGO7qd_9it@mail.gmail.com' \
    --to=iru.muzgo@gmail.com \
    --cc=9fans@9fans.net \
    /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).