腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
4
回答
对
pthread
CLion
的
引用
未定义
、
、
、
我正在尝试用
CLion
运行这个简单
的
线程c++程序#include <thread> } 我
的
问题是有一个
未定义
的
引用
pthread
的
错误,我不理解我做错了什么……请注意,我是在
CLion
上这样做
的
。
浏览 7
提问于2017-08-10
得票数 9
3
回答
对
`
pthread
_create‘
CLion
的
未定义
引用
、
、
我试图在Linux (Ubuntu)操作系统下使用
CLion
编译我
的
程序。我
的
CMake文件: project(untitled2 C) add_executable(untitled2 main.c) 我
的
程序图使用线程,所以,我添加了 set(CMAKE_CXX_FLAGS-
pthread
浏览 0
提问于2018-12-15
得票数 8
回答已采纳
1
回答
未定义
的
对
`
pthread
_cancel
的
引用
、
、
我用T编写了下面的
pthread
类。当我使用g++ -lpthread编译这个类时,它就正常工作了。但是,如果我从另一个类A扩展这个类并一起编译,它将返回一个错误;“
对
pthread
_cancel
的
未定义
引用
”class T{
pthread
_t thread; void start(){
pthread
_create(&thread,NULL,&run,thi
浏览 0
提问于2014-05-26
得票数 2
5
回答
在
Clion
的
调试器中,如何显示int数组
的
全部内容
、
、
、
、
现在,它只显示数组
的
第一个元素,但我希望看到数组中
的
所有元素。我觉得克里恩在用GDB。 编辑:我专门指的是堆上
的
数组。堆栈上
的
数组可以可视化。
浏览 3
提问于2016-10-30
得票数 50
回答已采纳
1
回答
C中使用p线程和信号量
的
Producer_consumer
、
、
、
sem_init
的
未定义
引用
/tmp/ccu6fydZ.o:在函数“生产者”中:producer_consumer2.c:(.text+0x11d):
对
`s
浏览 4
提问于2013-10-23
得票数 1
回答已采纳
2
回答
要使用什么库来避免
对
`
pthread
_atfork
的
未定义
引用
、
即使在使用
pthread
库之后,我也得到了
对
`
pthread
_atfork
的
未定义
引用
。有没有针对这个
的
单独
的
库?
浏览 2
提问于2010-03-04
得票数 1
1
回答
类中
的
Pthread
_create调用函数
、
static int id;{ int status;
pthread
_t(index = 0; index < 50; index++) { status =
pthread
_create(&Customer_Threads[index], NULL, Customers[
浏览 0
提问于2016-03-24
得票数 1
回答已采纳
1
回答
Linux上
的
pthread
_mutex_timedlock
、
、
我试图使用
pthread
_mutex_timedlock锁定互斥锁x秒,就像WaitForSingleObject一样。我包括了time.h和
pthread
.h文件,但是当我试图编译时,我得到了
对
pthread
_mutex_timedlock错误
的
一个
未定义
的
引用
。当我从
pthread
_mutex_timedlock中拿出一个论点并试图编译时,我得到 函数"
pthread
_mutex_timedlock“
浏览 0
提问于2018-10-18
得票数 1
回答已采纳
1
回答
未定义
的
对
``
CLion
的
引用
、
、
、
我试图在
CLION
中编译一个项目,但我无法成功,但我可以在Eclipse中编译完全相同
的
文件。Structures 1/HW 2/library1.cpp:17: 现在,我已经包含了所请求
的
文件,例如,在library1.cpp 1.cpp
的
源文件中,我有:#include "DataStructure.h
浏览 1
提问于2016-12-02
得票数 0
回答已采纳
1
回答
Clion
未定义
对
函数
的
引用
、
、
、
我有一个简单
的
程序和我
的
main.cpp,一个头文件func.h和另一个源文件func.cpp。我使用
CLion
2016.3。我
的
编译器是gcc。a; func.h#define TEST2_FUNC_H 我
的
cmakelists.txt我已经搜索了其他类似的问题,并找到了一些解决方案,但它们
对
我不起作用,或者我不知道该怎么办。实际
浏览 0
提问于2017-02-24
得票数 6
回答已采纳
1
回答
g++ ubuntu多线程
未定义
引用
、
、
、
我在ubuntu上编写了一个c#代码,它创建了一定数量
的
线程,我已经添加了creates库,但是当我运行该代码时,它会出现以下错误。Threads.cc:(.text+0x128):
对
“
pthread
_create”
的
未定义
引用
我使用
的
是我尝试过许多建议
的
解决方案,但都
浏览 1
提问于2015-12-03
得票数 0
回答已采纳
1
回答
C编译“
未定义
的
引用
”?
、
我有一个像这样
的
C代码:#include <stdio.h>#include <time.h>
pthread
_join(tid[i],NULL); pi = 4*(float)sumofinpoint/(float)nu
浏览 1
提问于2017-03-26
得票数 0
1
回答
当销毁一个锁定
的
互斥体时,
pthread
_mutex_destroy
的
正确行为是什么?
、
、
、
、
pthread
_mutex_lock(&t); if (res !return 0; 也在 试图销毁被
引用
的
锁定互斥或互斥(例如,当另一个线程使用
pthread
_cond_timedwait()或
pthread
_cond_wait()) 时,会导致
未定义
的
行为。试图破坏锁定
的
互斥对象
浏览 6
提问于2014-04-16
得票数 4
回答已采纳
3
回答
试图在Ubuntu上使用p线程时出错
、
、
、
+0x2e): undefined reference tostd::ostream::operator<<(long)‘std::cout’thread_test.cpp:(.text+0x1f):
未定义
的
对
):
未定义
的
对
std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std>&
浏览 8
提问于2013-04-23
得票数 2
回答已采纳
1
回答
定义使用自身线程id调用join
的
行为
、
下列C语句
的
行为是什么:
pthread
_join(
pthread
_self(),NULL); 这是否意味着该线程将不能加入任何其他线程?
浏览 2
提问于2014-11-16
得票数 1
1
回答
如何在
clion
中运行qt creator演示代码?
、
要查看代码:我在https://github.com/jaysimon/
clion
_qtcreator上创建了一个存储库 我成功地在qt creator中制作了一个演示ui,但在
clion
中使用相同
的
代码失败了推送请求是最好
的
。src/deal.cpp)
浏览 28
提问于2019-03-14
得票数 0
5
回答
RE2库无法在ubuntu中使用“”进行编译
、
、
reference topthread_rwlock_wrlock‘/usr/local/lib/libre2.so:
对
pthread
_rwlock_destroy' /usr/local/lib/libre2.so: undefined reference topthread_rwlock_init’/usr/local/lib/libre2.so
的
未定义
引用
:
对</
浏览 0
提问于2014-02-22
得票数 2
2
回答
使用线程编译程序中
的
错误
、
在编译时,我得到一个错误“
未定义
的
引用
到
pthread
_create()”和类似的“
未定义
的
引用
到
pthread
_join()”。可能
的
原因是什么?我无法辨认他们。
浏览 0
提问于2010-08-21
得票数 0
2
回答
当main.c不使用
pthread
时,为什么我必须在main.c编译中显式地链接到
pthread
?
、
、
、
在Linux中,我有一个使用
pthread
的
共享库和一个不使用
pthread
的
main.c库。$ icc -Wall -o main main.c -lmapreduce /opt/intel/C
浏览 6
提问于2012-03-14
得票数 2
回答已采纳
2
回答
在
pthread
_create()中,在创建
的
线程退出之前释放args时
的
行为
、
、
、
在
pthread
_create( *thread, *attr, *start_routine, *arg)中,如果arg在创建
的
线程退出之前被释放,会有什么行为?我没有在Open Group
的
规范中看到它
的
描述,所以它很可能是
未定义
的
,我只是找不到一个地方来确认这两种方式。
浏览 0
提问于2015-07-03
得票数 0
点击加载更多
热门
标签
更多标签
云服务器
ICP备案
腾讯会议
云直播
对象存储
活动推荐
运营活动
广告
关闭
领券