FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 12-08-2010, 01:50 PM
Rex Dieter
 
Default g++ -shared -pthread doesn't link -lpthread ?

I'm trying to find the best solution to:
https://bugzilla.redhat.com/show_bug.cgi?id=661115

Where a shlib is generated using
g++ -shared -pthread ...
but the result is a library with undefined symbols to pthread_create (and
friends).

Do I really need to explicity link -lpthread , or is there a better
solution?

-- Rex

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 12-08-2010, 02:05 PM
Mamoru Tasaka
 
Default g++ -shared -pthread doesn't link -lpthread ?

Rex Dieter wrote, at 12/08/2010 11:50 PM +9:00:
> I'm trying to find the best solution to:
> https://bugzilla.redhat.com/show_bug.cgi?id=661115
>
> Where a shlib is generated using
> g++ -shared -pthread ...
> but the result is a library with undefined symbols to pthread_create (and
> friends).
>
> Do I really need to explicity link -lpthread , or is there a better
> solution?
>
> -- Rex
>


Maybe this?
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
-pthread should have priority over -nostdlib -> CLOSED INVALID

Regards,
Mamoru
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 12-08-2010, 02:15 PM
Rex Dieter
 
Default g++ -shared -pthread doesn't link -lpthread ?

Mamoru Tasaka wrote:

> Rex Dieter wrote, at 12/08/2010 11:50 PM +9:00:
>> I'm trying to find the best solution to:
>> https://bugzilla.redhat.com/show_bug.cgi?id=661115
>>
>> Where a shlib is generated using
>> g++ -shared -pthread ...
>> but the result is a library with undefined symbols to pthread_create (and
>> friends).
>>
>> Do I really need to explicity link -lpthread , or is there a better
>> solution?

> Maybe this?
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
> -pthread should have priority over -nostdlib -> CLOSED INVALID

Ah, yes, -nostdlib is used in this context. fun.

-- Rex


--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 

Thread Tools




All times are GMT. The time now is 05:22 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org