Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Utilizing threads(Eclipse not resolving symbol 'thread', 'join', etc.)
Utilizing threads [message #1181981] Tue, 12 November 2013 00:06 Go to next message
Kevin Preston is currently offline Kevin PrestonFriend
Messages: 3
Registered: November 2013
Junior Member
I have attempted to utilize concurrency.

*Here is the error I received:
"Type 'thread' could not be resolved"

*Here is the code I have:
#include <iostream>
#include <thread>

using namespace std;

void p1(){
	cout<<"process 1 is processing"<<endl;
}

int main() {
	thread t1(p1);
	return 0;
}


*Some History:
I already solved a previous issue during compilation with help of another post by adding "-std=gnu++11" to the following:
Properties->C/C++ Build->Settings->GCC C++ compiler->Miscellaneous->Other Flags

* I can see the header file "thread" in the include file paths.

*Eclipse Platform

Version: 3.8.1
Re: Utilizing threads [message #1185067 is a reply to message #1181981] Wed, 13 November 2013 21:59 Go to previous messageGo to next message
Kevin Preston is currently offline Kevin PrestonFriend
Messages: 3
Registered: November 2013
Junior Member
The problem is actually the g++ compiler, issue already resolved at another website (I have not the privileges to post URL's)


The solution is to use the clang++ compiler in the basic terminal.
Re: Utilizing threads [message #1193132 is a reply to message #1185067] Sun, 17 November 2013 23:29 Go to previous message
Kevin Preston is currently offline Kevin PrestonFriend
Messages: 3
Registered: November 2013
Junior Member
Ok update on my attempt at multithreading:

1. clang++ compiler works with threads in the terminal
2. g++ compiler does not work with threads in the terminal

3. clang++, with Eclipse CDT does not work with threads
4. g++, with Eclipse CDT does not work with threads

perhaps some setting, flag, or path is wrong within Eclipse?
Previous Topic:Eclipse Juno and PowerPC GNU Cygwin compiler on Windows 7
Next Topic:Interrupt build with keyboard
Goto Forum:
  


Current Time: Wed Apr 24 14:33:03 GMT 2024

Powered by FUDForum. Page generated in 0.03171 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top