Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

697
Views
g++ 4.8.1 Subprocesos de C++, std::system_error - ¿operación no permitida?

Esta no es una pregunta duplicada, porque las soluciones presentadas no funcionan en mi compilador. Estoy tratando de compilar y ejecutar el siguiente ejemplo de esta pregunta .

 #include <thread> #include <iostream> int main(int, char **){ std::thread tt([](){ std::cout<<"Thread!"<<std::endl; }); tt.join(); }

He intentado usar las soluciones presentadas tanto en la pregunta original como en la respuesta aceptada a este duplicado . Sin embargo, aunque probé todas las combinaciones enumeradas, y en particular probé

 g++ main.cpp -o main.out -pthread -std=c++11

Cuando ejecuto el ejecutable resultante, todavía obtengo

 terminate called after throwing an instance of 'std::system_error' what(): Enable multithreading to use std::thread: Operation not permitted Aborted (core dumped)

Aquí está la salida de g++ --version .

 g++ (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1 Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

¿Hay un orden diferente o un conjunto de comandos que necesito usar para g++ 4.8.1 ?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

esto fue respondido aqui

 g++ -Wl,--no-as-needed -std=c++11 -pthread main.cpp -o main.out
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!