* Linking Issue,
@ 2007-02-08 13:05 Craig Main
2007-02-08 13:32 ` Sinan KAYA
0 siblings, 1 reply; 4+ messages in thread
From: Craig Main @ 2007-02-08 13:05 UTC (permalink / raw)
To: pthreads-win32
Hi,
I had really hoped to solve this problem by searching the list archive, so
sorry for the question, but I am struggling.
I am sure this is a simple one.
I am using MinGW to compile and use pthreads.
I have built libpthreadGC2d.a and libpthreadGC2.a
I cannot seem to link the built library to my c++ application.
With -DPTW32_STATIC_LIB I receive undefined reference 'pthread_create', and
without the define I receive undefined reference '__imp_pthread_create'
Is this a common problem?
Regards
Craig
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: Linking Issue,
2007-02-08 13:05 Linking Issue, Craig Main
@ 2007-02-08 13:32 ` Sinan KAYA
2007-02-08 15:38 ` Craig Main
0 siblings, 1 reply; 4+ messages in thread
From: Sinan KAYA @ 2007-02-08 13:32 UTC (permalink / raw)
To: Craig Main, pthreads-win32
This is a compiler specific problem.Check out gcc documentation on how
to use it.
You use -l switch to link a library against a project. You need
something like
gcc .... -lpthreadGC2d
Note that you omit lib in front of the library file and you can also
tell the compiler where to find the library by "-L" switch
Sinan.
-----Original Message-----
From: pthreads-win32-owner@sourceware.org
[mailto:pthreads-win32-owner@sourceware.org] On Behalf Of Craig Main
Sent: Thursday, February 08, 2007 3:05 PM
To: pthreads-win32@sourceware.org
Subject: Linking Issue,
Hi,
I had really hoped to solve this problem by searching the list archive,
so
sorry for the question, but I am struggling.
I am sure this is a simple one.
I am using MinGW to compile and use pthreads.
I have built libpthreadGC2d.a and libpthreadGC2.a
I cannot seem to link the built library to my c++ application.
With -DPTW32_STATIC_LIB I receive undefined reference 'pthread_create',
and
without the define I receive undefined reference '__imp_pthread_create'
Is this a common problem?
Regards
Craig
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: Linking Issue,
2007-02-08 13:32 ` Sinan KAYA
@ 2007-02-08 15:38 ` Craig Main
2007-03-02 12:39 ` Craig Main
0 siblings, 1 reply; 4+ messages in thread
From: Craig Main @ 2007-02-08 15:38 UTC (permalink / raw)
To: 'Sinan KAYA', pthreads-win32
Hi Sinan,
I really appreciate your reply.
Thanks very much. I think you are on the right track, but I don't think
that's quite it.
I have tried altering the -lpthreadGC2d by specifying the whole name of the
file, I have tried a few combinations. If I specify the library incorrectly
then I get a file not found error, which makes perfect sense. In my case,
and I could be wrong, I suspect that I am specifying the file correctly, but
that a leading underscore is being omitted for some reason.
Dumpbin on libpthreadGC2d.a indicates that the symbol being exported from
the library is '_pthread_create', whilst my code is trying to link
'pthread_create'. Somehow I am missing a leading underscore '_'.
This could be a c / c++ issue, but I have tried using extern "C" { #include
<pthread.h> } which does not help. There is something simple I am missing
with the naming of the symbols.
Regards
Craig
-----Original Message-----
From: pthreads-win32-owner@sourceware.org
[mailto:pthreads-win32-owner@sourceware.org] On Behalf Of Sinan KAYA
Sent: 08 February 2007 03:32 PM
To: Craig Main; pthreads-win32@sourceware.org
Subject: RE: Linking Issue,
This is a compiler specific problem.Check out gcc documentation on how
to use it.
You use -l switch to link a library against a project. You need
something like
gcc .... -lpthreadGC2d
Note that you omit lib in front of the library file and you can also
tell the compiler where to find the library by "-L" switch
Sinan.
-----Original Message-----
From: pthreads-win32-owner@sourceware.org
[mailto:pthreads-win32-owner@sourceware.org] On Behalf Of Craig Main
Sent: Thursday, February 08, 2007 3:05 PM
To: pthreads-win32@sourceware.org
Subject: Linking Issue,
Hi,
I had really hoped to solve this problem by searching the list archive,
so
sorry for the question, but I am struggling.
I am sure this is a simple one.
I am using MinGW to compile and use pthreads.
I have built libpthreadGC2d.a and libpthreadGC2.a
I cannot seem to link the built library to my c++ application.
With -DPTW32_STATIC_LIB I receive undefined reference 'pthread_create',
and
without the define I receive undefined reference '__imp_pthread_create'
Is this a common problem?
Regards
Craig
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: Linking Issue,
2007-02-08 15:38 ` Craig Main
@ 2007-03-02 12:39 ` Craig Main
0 siblings, 0 replies; 4+ messages in thread
From: Craig Main @ 2007-03-02 12:39 UTC (permalink / raw)
To: 'Sinan KAYA', pthreads-win32
Hi Sinan,
I really appreciate your reply.
Thanks very much. I think you are on the right track, but I don't think
that's quite it.
I have tried altering the -lpthreadGC2d by specifying the whole name of the
file, I have tried a few combinations. If I specify the library incorrectly
then I get a file not found error, which makes perfect sense. In my case,
and I could be wrong, I suspect that I am specifying the file correctly, but
that a leading underscore is being omitted for some reason.
Dumpbin on libpthreadGC2d.a indicates that the symbol being exported from
the library is '_pthread_create', whilst my code is trying to link
'pthread_create'. Somehow I am missing a leading underscore '_'.
This could be a c / c++ issue, but I have tried using extern "C" { #include
<pthread.h> } which does not help. There is something simple I am missing
with the naming of the symbols.
Regards
Craig
-----Original Message-----
From: pthreads-win32-owner@sourceware.org
[mailto:pthreads-win32-owner@sourceware.org] On Behalf Of Sinan KAYA
Sent: 08 February 2007 03:32 PM
To: Craig Main; pthreads-win32@sourceware.org
Subject: RE: Linking Issue,
This is a compiler specific problem.Check out gcc documentation on how
to use it.
You use -l switch to link a library against a project. You need
something like
gcc .... -lpthreadGC2d
Note that you omit lib in front of the library file and you can also
tell the compiler where to find the library by "-L" switch
Sinan.
-----Original Message-----
From: pthreads-win32-owner@sourceware.org
[mailto:pthreads-win32-owner@sourceware.org] On Behalf Of Craig Main
Sent: Thursday, February 08, 2007 3:05 PM
To: pthreads-win32@sourceware.org
Subject: Linking Issue,
Hi,
I had really hoped to solve this problem by searching the list archive,
so
sorry for the question, but I am struggling.
I am sure this is a simple one.
I am using MinGW to compile and use pthreads.
I have built libpthreadGC2d.a and libpthreadGC2.a
I cannot seem to link the built library to my c++ application.
With -DPTW32_STATIC_LIB I receive undefined reference 'pthread_create',
and
without the define I receive undefined reference '__imp_pthread_create'
Is this a common problem?
Regards
Craig
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-02-08 16:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-08 13:05 Linking Issue, Craig Main
2007-02-08 13:32 ` Sinan KAYA
2007-02-08 15:38 ` Craig Main
2007-03-02 12:39 ` Craig Main
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 read-only IMAP folder(s) and NNTP newsgroup(s).