Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7895873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:44:53+00:00 2026-06-03T07:44:53+00:00

I tried to test an example of C++11 threads in Eclipse. But I got

  • 0

I tried to test an example of C++11 threads in Eclipse. But I got this message when running the program:

terminate called after throwing an instance of ‘std::system_error’
what(): Operation not permitted’

My system: ubuntu + gcc 4.7

Program:

#include <iostream>
#include <thread>

void worker()
{
    std::cout << "hello from worker" << std::endl;
}

int main(int argc, char **argv)
{
    std::thread t(worker);
    t.join();
}

…and yes, I put -std=c++11 and -pthread inside C/C++ Build -> Settings -> Tool Settings -> Cross G++ Compiler -> Miscellaneous -> Other Flags.

Any comments?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T07:44:54+00:00Added an answer on June 3, 2026 at 7:44 am

    The problem was solved by the comment of Jonathan Wakely.

    I added -pthread to C/C++ Build -> Settings -> Tool Settings -> Cross G++ **Linker** -> Miscellaneous -> Other Flags and the program worked correctly.

    Thank you Jonathan.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I tried a test file which is working but this file isn't. I also
Tried examples from 'php.net' but don't understand what's the problem. Any suggestions? <?php $_SESSION['test']
I got strange behavior when I tried to test my navigator.geolocation.getCurrentPosition web page. Here
i have tried this: <?php $fileip = fopen(test.txt,r); ?> this should have opened the
I need to test a perl script in a remote server. I tried running
I have tried all kinds of different ways to query this but just can't
i have class named Group i tried to test configuration: var cfg = new
Has anybody tried any Unit Test generators for .Net? I assume although it won't
I tried to make http get request with code: String username = test\\v100; String
in order to test a managed class I tried to create an instance in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.