Can someone compile and place the executable here? I'm lazy and I don't want to get gcc or make a new project.
Safer to use http://www.ideone.com though some things do have issues on it. Apparently Mats code timed out, but I trusted him enough to compile it to get "replies" as the result.
@chrisname
Apparently you have a special compiler as ideone gives the same error Zorg says:
@BHX
I mentioned about ideone already. It won't work because they have threads disabled (otherwise anyone could write a program which creates so many threads that it kills the OS).
ideone wrote:
terminate called after throwing an instance of 'std::system_error'
what(): Enable multithreading to use std::thread: Operation not permitted
Clearly this is saying that threading is not enabled.
Maybe you need to enable it manually. Try adding -pthread to your command-line.
Maybe you need to enable it manually. Try adding -pthread to your command-line.
How peculiar, I did build it with -pthread but got the error. This is the output in my terminal. It gave me the error three times, was about to just chalk it up to just a fluke, but then it started working.
:~$ cd projects/cpp/tests
:~/projects/cpp/tests$ ./chrisname
terminate called after throwing an instance of 'std::system_error'
what(): Enable multithreading to use std::thread: Operation not permitted
Aborted
:~/projects/cpp/tests$ ./chrisname
terminate called after throwing an instance of 'std::system_error'
what(): Enable multithreading to use std::thread: Operation not permitted
Aborted
:~/projects/cpp/tests$ ./chrisname
terminate called after throwing an instance of 'std::system_error'
what(): Enable multithreading to use std::thread: Operation not permitted
Aborted
:~/projects/cpp/tests$ ./chrisname
Message: hello, world
:~/projects/cpp/tests$ ./chrisname
Message: hello, world
:~/projects/cpp/tests$ time ./chrisname
Message: hello, world
real 0m9.628s
user 0m15.320s
sys 0m3.732s
:~/projects/cpp/tests$
Added the time print out.
*shrugs* I don't know why it didn't work at first, but has worked everytime since. I'll just chalk it up to being a fluke for now and hope it doesn't show up anymore.
I guess my toolchain links against pthread by default and yours don't.
@BHX
That's really weird. Is it possible you ran it the first three times before g++ had finished compiling it? Or maybe your OS was running a cached version.
@Fredbill try compiling it as a c++ program (use g++ not gcc)
EDIT: The problem could also be the thread model used by your version of mingw. Run g++ -v, if it says thread model win32 then that's probably the problem.
$ g++ -std=c++11 chrisname.cpp -o fun && fun
terminate called after throwing an instance of 'std::system_error'
what(): Enable multithreading to use std::thread: Operation not permitted
Aborted
$ g++ -std=c++11 chrisname.cpp -lpthread -o fun && fun
Message: hello, world
With that link to the obfuscated code you posted I keep getting this as the output on IDEone:
Its a tetris game, you have to compile it yourself to play it ...
Here's another good one , if you got linux (it uses X11) ... http://www.ioccc.org/years.html#1998
See banks,
First read the banks.hint,then download the makefile,some sceneries,and the c source code and run
@SatsumaBenji
That is easy! Instead of the tetriminos, make it a chat like program where the text of the replies become your pieces, but pause when you start typing your reply ;).