-
Notifications
You must be signed in to change notification settings - Fork 92
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
ppu-g++ std::thread problem #122
Comments
something similar to this here |
It appears that ppu-g++ 13.2.0 lacks support for std::thread. Instead of std::thread t1(threadFunction, 1); use pthread_create(&thread_id, nullptr, thread_function, nullptr); Note pthread isn't supported natively as well on ps3. How I did for testingdocker run -i --rm hldtux/ps3dev bash -s <<EOF
echo '#include <iostream>
extern "C" {
#include <pthread.h>
}
void* thread_function(void* arg) {
std::cout << "Hello from thread\n";
return nullptr;
}
int main() {
pthread_t thread_id;
pthread_create(&thread_id, nullptr, thread_function, nullptr);
pthread_join(thread_id, nullptr);
std::cout << "Back in main thread\n";
return 0;
}' > main.cpp
ppu-g++ main.cpp -o main \
-I/usr/local/ps3dev/portlibs/ppu/include \
-L/usr/local/ps3dev/portlibs/ppu/lib -lpthread
ppu-g++ --version
file main
EOF output
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there anything missing on ppu-g++ to compile std::thread ?
Trying to compile std::thread
output
The text was updated successfully, but these errors were encountered: