相关疑难解决方法(0)

Cygwin 中无法识别的命令行选项“-pthread”

我正在尝试在 Cygwin 中构建April Tags项目的 C 实现,但是在运行 make 时出现以下错误(我已经安装了来自 Cygwin 开发部分的 gcc-core 和 make 包):

apriltag.o
gcc: error: unrecognized command line option ‘-pthread’
Makefile:23: recipe for target 'apriltag.o' failed
make: *** [apriltag.o] Error 1
Run Code Online (Sandbox Code Playgroud)

生成文件的内容是:

CC = gcc
AR = ar

CFLAGS = -std=gnu99 -Wall -Wno-unused-parameter -Wno-unused-function -pthread -I. -Icommon -O1
LDFLAGS = -lpthread -lm

APRILTAG_OBJS = apriltag.o apriltag_quad_thresh.o tag16h5.o tag25h7.o tag25h9.o tag36h10.o tag36h11.o tag36artoolkit.o g2d.o common/zarray.o common/zhash.o common/zmaxheap.o common/unionfind.o common/matd.o common/image_u8.o common/pnm.o common/image_f32.o common/image_u32.o common/workerpool.o common/time_util.o common/svd22.o common/homography.o …
Run Code Online (Sandbox Code Playgroud)

c gcc cygwin makefile pthreads

6
推荐指数
1
解决办法
5696
查看次数

在glibc中是pthread.so由弱符号实现,以提供pthread存根函数?

pthreadglibc.so由弱符号实现来提供pthread存根的功能呢?

我知道有pthread.so提供类似的功能pthreadglibc.so有人说pthreadglibc只提供存根,将被明确时更换连接到lpthread.

所以我的问题是如何支持它?使用弱符号或其他技术?

libssl类似pthreadglibc

linker pthreads

4
推荐指数
1
解决办法
1463
查看次数

标签 统计

pthreads ×2

c ×1

cygwin ×1

gcc ×1

linker ×1

makefile ×1