From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4946E785.9000202@kix.es> Date: Tue, 16 Dec 2008 00:25:57 +0100 From: Rodolfo kix Garcia User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) MIME-Version: 1.0 To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> References: <95568f93ecebea5f9de8bbf366d7325d.squirrel@webmail.kix.es> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [9fans] 9P in C++ Topicbox-Message-UUID: 62485514-ead4-11e9-9d60-3106f5b1d025 Pietro Gagliardi escribi=F3: > 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=20 plan9port three. Any help? Thanks a lot.