Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

ppu-g++ compile std::thread #2

Closed
humbertodias opened this issue Mar 8, 2024 · 3 comments
Closed

ppu-g++ compile std::thread #2

humbertodias opened this issue Mar 8, 2024 · 3 comments

Comments

@humbertodias
Copy link
Contributor

humbertodias commented Mar 8, 2024

Trying to compile std::thread

docker run -i --rm mlafeldt/ps3dev bash -s <<EOF
echo "#include <iostream>
#include <thread>

// Function to be executed by the thread
void threadFunction(int threadID) {
    std::cout << "Thread " << threadID << " is executing" << std::endl;
}

int main() {
    // Creating a thread and passing a function to execute
    std::thread t1(threadFunction, 1);

    // Joining the thread to the main thread
    t1.join();

    // Output a message from the main thread
    std::cout << "Main thread is executing" << std::endl;

    return 0;
}" > oo.cpp
ppu-g++ oo.cpp -o oo -std=c++11
EOF

output

oo.cpp: In function 'void threadFunction(int)':
oo.cpp:6:18: error: 'Thread' was not declared in this scope
oo.cpp:6:42: error: 'is' was not declared in this scope
oo.cpp:6:45: error: expected ';' before 'executing'
oo.cpp: In function 'int main()':
oo.cpp:11:5: error: 'thread' is not a member of 'std'
oo.cpp:11:17: error: expected ';' before 't1'
oo.cpp:14:5: error: 't1' was not declared in this scope
oo.cpp:17:18: error: 'Main' was not declared in this scope
oo.cpp:17:23: error: expected ';' before 'thread'
@mlafeldt
Copy link
Owner

@humbertodias Thanks for the report.

TBH, I haven't been involved in the PS3 homebrew community for years (I was the one who created github.com/ps(2|3)dev initially).

That said, I'm considering archiving this repo unless someone (maybe you? 😄 ) wants to take it over.

Ideally, the project would be merged with https://github.com/ps3dev/ps3dev-docker, which looks a bit more official.

@humbertodias
Copy link
Contributor Author

That's ok. I'm gonna use this one as well.
In fact, I have already pushed something there ps3dev/ps3dev-docker#6 and recreated the same issue ps3dev/ps3dev-docker#7
Thanks

@mlafeldt
Copy link
Owner

@humbertodias Awesome! Let me link to that repo and archive this one for good. ✌️

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

No branches or pull requests

2 participants