Skip to content
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

GCC8: linking std::async fails #47

Closed
capehill opened this issue May 21, 2018 · 2 comments
Closed

GCC8: linking std::async fails #47

capehill opened this issue May 21, 2018 · 2 comments

Comments

@capehill
Copy link

Testing new toys. A simple thread creation compiles, links and works. Std::async didn't:

#include <thread>
#include <future>

#include <cstdio>
#include <unistd.h>

int thread()
{
	printf("Hello from thread\n");
	return 0;
}

int main()
{
	//std::thread t(thread);
	auto fut = std::async(thread);

	printf("Hello from main\n");
	
	usleep(100000);	
	return 0;
}

g++ thread.cpp -athread=native

/Code/adtools-os4-8-20180519-611/bin/../lib/gcc/ppc-amigaos/8.1.0/../../../libstdc++.a(condition_variable.o): In function std::condition_variable::~condition_variable()': /var/lib/jenkins/workspace/native-gcc-8/gcc/repo/libstdc++-v3/src/c++11/condition_variable.cc:46: undefined reference to __gthread_cond_destroy'

sba1 added a commit that referenced this issue May 22, 2018
@sba1
Copy link
Owner

sba1 commented May 22, 2018

I added that stub. A new version should appear in some hours.

@capehill
Copy link
Author

-617 worked. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants