From: kix <kix@kix.es>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] 9P in C++
Date: Sat, 13 Dec 2008 16:18:41 -0500 [thread overview]
Message-ID: <494426B1.1080109@kix.es> (raw)
In-Reply-To: <856A9289-A66E-4042-883B-E4D7383F3BF6@mac.com>
Thanks Pietro, sqweek,
I can't compile it :-/
Some info:
kix@sys:~/2008110109$ cat Makefile
all:
g++ -Wall -fPIC -c a.C
g++ -Wall -fPIC -c b.C
g++ -Wall -fPIC -c c.C
9c -Wall -o tryfs.o tryfs.c
9l -Wall -shared -lthread -o libtry.so a.o b.o c.o tryfs.o
/usr/local/plan9/lib/libthread.a
g++ -Wall -g -o simple-01 simple-01.C -L. -l try -lstdc++
kix@sys:~/2008110109$ make
...
9l -Wall -shared -lthread -o libtry.so a.o b.o c.o tryfs.o
/usr/local/plan9/lib/libthread.a
g++ -Wall -g -o simple-01 simple-01.C -L. -l try -lstdc++
./libtry.so: undefined reference to `threadmain(int, char**)'
collect2: ld returned 1 exit status
make: *** [all] Error 1
kix@sys:~/2008110109$ ldd libtry.so
linux-gate.so.1 => (0xb7eed000)
libresolv.so.2 => /lib/i686/cmov/libresolv.so.2 (0xb7ece000)
libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb7ea8000)
libutil.so.1 => /lib/i686/cmov/libutil.so.1 (0xb7ea3000)
libpthread.so.0 => /lib/i686/cmov/libpthread.so.0 (0xb7e8a000)
libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7d2f000)
/lib/ld-linux.so.2 (0xb7eee000)
In the tryfs.c file:
void
threadmain(int argc, char *argv[])
{
}
Thanks.
Pietro Gagliardi wrote:
>
>>> -l/usr/local/plan9/lib/libthread.so (or whatever it is) help?
>>
>> You can't use -l with a full path, but you can simply specify the
>> full path of the library:
>> gcc -o demo1 demo1.C /usr/local/plan9/lib/libthread.a
>> Note that the order of the objects on the command-line is as usual
>> important.
>> -sqweek
>>
>
> Ah yes, something I forgot while drifting through the hordes of gcc
> madness that is... not using gcc. Thanks for refreshing my memory. Now
> to see if this is working for kix.
>
next prev parent reply other threads:[~2008-12-13 21:18 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
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 [this message]
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=494426B1.1080109@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).