[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Linking issue when using MinGW with Posix Threads
[Thread Prev] | [Thread Next]
- Subject: Re: Linking issue when using MinGW with Posix Threads
- From: Andreas Schneider <asn@xxxxxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Thu, 16 Jan 2020 16:23:39 +0100
- To: libssh@xxxxxxxxxx
- Cc: g4-lisz@xxxxxxxxxxxx
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: > > CMakeFiles/ssh.dir/objects.a(pthread.c.obj):pthread.c:(.text+0x43): > undefined reference to `pthread_mutex_destroy' > > ... and so on. > > This can be solved by adding `-lpthread `at the end of the last line of > build/src/CMakeFiles/ssh.dir/link.txt > > 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: https://git.libssh.org/users/asn/libssh.git/commit/?h=master-threads -- Andreas Schneider asn@xxxxxxxxxxxxxx GPG-ID: 8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D
Re: Linking issue when using MinGW with Posix Threads | g4-lisz@xxxxxxxxxxxx |
Re: Linking issue when using MinGW with Posix Threads | Nikos Mavrogiannopoulos <nmav@xxxxxxxxxx> |
Linking issue when using MinGW with Posix Threads | g4-lisz@xxxxxxxxxxxx |