From: Rodolfo kix Garcia <kix@kix.es>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] 9P in C++
Date: Tue, 16 Dec 2008 00:25:57 +0100 [thread overview]
Message-ID: <4946E785.9000202@kix.es> (raw)
In-Reply-To: <B009CF29-0332-434D-973F-65A01CFA23E5@mac.com>
Pietro Gagliardi escribió:
> Given
>
> extern "C"{
> #include <9p.h> // or whatever you do
> }
>
> you can link 9p into a C++ program easily.
>
Thanks Pietro :-)
I use:
#include stdio.h
#include blablabla.h
extern void threadmain(int c, char *a[])
Now the file compiles. But I have other problem.
gcc -L. -ltry -o demo1 demo1.C
./libtry.so: Undefined reference to threadmain(...)
Then, I try:
gcc -L /usr/local/plan9/lib -L. -ltry -lthread demo1.C -o demo1 ## OK!
./demo1
Segmentation Fault
using ldd I can see libthread is /usr/lib/libthread, not in the
plan9port three.
Any help?
Thanks a lot.
next prev parent reply other threads:[~2008-12-15 23:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-15 15:45 Rodolfo kix García
2008-12-15 16:56 ` sqweek
2008-12-15 16:59 ` Iruata Souza
2008-12-15 21:13 ` Pietro Gagliardi
2008-12-15 23:25 ` Rodolfo kix Garcia [this message]
2008-12-15 23:34 ` Pietro Gagliardi
2008-12-16 2:16 ` sqweek
2008-12-16 2:31 ` Pietro Gagliardi
2008-12-13 21:18 ` kix
2008-12-17 22:14 ` Rodolfo kix Garcia
2008-12-18 7:16 ` sqweek
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=4946E785.9000202@kix.es \
--to=kix@kix.es \
--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).