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.

Reply via email to