On Mon, Jul 26, 2010 at 7:06 AM, Jay K <[email protected]> wrote:
> $ gcc 1.c  -L/usr/X11R6/lib -lX11 -pthread -static
> $ ./a.out
> 0x0
> 0x0
>
>
> I use -static deliberately so I can give binaries that work on other
OpenBSD
> versions.
> I give source too, it's not too keep source private, but it is for "ease of
> use".
>
>
> Putting -lpthread (not -pthread) ahead of -lX11 fixes it.
>
>
> I suppose there is a goal to enable using -lX11 without using -pthread?

Yes.  There's no reason every X11 program in the world needs to link
with pthreads.

> And I suppose -static isn't meant to be much supported?

It should, but I think the compiler may be confused about the fake
pthreads stubs.

>  Merging libpthread into libc is the way imho.

That would make it somewhat difficult to work on a second pthreads library...

Reply via email to