-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undefined reference to pthread, for examples #110
Comments
Ok, feeling like a monkey poking an ant hill with a stick, I found, in CMakeLists.txt the loop where it goes through the examples, i.e. line 213: target_link_libraries(${EXAMPLE}.fcgi PRIVATE Fastcgipp::fastcgipp pthread) --- I added that "pthread", and then it all builds. |
Make sure your cmake project is doing If you need to manually set your flags you'll want to add |
this DEFINITELY should be in the README file! @eddic |
I am trying to cross-compile this for arm-linux-gnueabihf (raspberry pi), so I created a toolchain file setting compilers, assembler, linker etc to those prefixed toolchain binaries.
The library builds.
When I try "make timer.fcgi" (or other examples), it gives me a linker error: undefined reference to 'pthread_cond_clockwait' and 'pthread_create'.
Now I know pthread-related linker errors when quickly setting up an own little project and just add an option to statically link that.
But this shouldn't happen here, right?
Is there a conceivable way of how that can happen due to the cross-compilation setup missing something?
I'm not exactly experienced in CMake.
The text was updated successfully, but these errors were encountered: