简体   繁体   English

VS2017 Linux C ++线程问题

[英]VS2017 Linux C++ threads issue

I have been testing the VS2017 Linux C++ with remote debugger on Linux Ubuntu. 我一直在Linux Ubuntu上使用远程调试器测试VS2017 Linux C ++。 I have created a few example projects for C++ and everything has been working great until I got to threading examples. 我已经为C ++创建了一些示例项目,在我进入示例线程之前,一切工作都很好。

I cannot seem to get the threads to compile as I keep getting "undefined reference to `pthread_create'" error. 我似乎无法获得要编译的线程,因为我不断收到“对“ pthread_create”的未定义引用”错误。 I know the solution to this is to add -lpthread or -pthread to the VS project properties command line but this does not seem to work in this case. 我知道解决方案是将-lpthread或-pthread添加到VS项目属性命令行,但这在这种情况下似乎不起作用。

If anyone has got this working could you please point me in the right direction. 如果有人进行了这项工作,您能为我指明正确的方向吗?

链接器->输入->库依赖pthread

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM