Re: Linking issue when using MinGW with Posix Threads
- Subject: Re: Linking issue when using MinGW with Posix Threads
- From: g4-lisz@xxxxxxxxxxxx
- Reply-to: libssh@xxxxxxxxxx
- Date: Thu, 16 Jan 2020 20:38:02 +0100
- To: libssh@xxxxxxxxxx
- Cc: Andreas Schneider <asn@xxxxxxxxxxxxxx>
On 16.01.20 16:23, Andreas Schneider wrote:
> On Thursday, 16 January 2020 14:40:50 CET g4-lisz@xxxxxxxxxxxx wrote:
>> Hi there,
>> cmake detects pthreads and compiling goes well. But on linking, there
>> are unresolved references:
>> undefined reference to `pthread_mutex_destroy'
>> ... and so on.
>> This can be solved by adding `-lpthread `at the end of the last line of
>> I don't know a lot about cmake. So I couldn't find a way to tell it to
>> add it at the rigth place.
>> CMAKE_SHARED_LINKER_FLAGS etc. did not do the trick because it puts it
>> in the wrong place (before CMakeFiles/ssh.dir/objects.a).
> Can you try:
Yes, that fixed it!
Archive administrator: firstname.lastname@example.org