Wednesday

How to set CodeBlocks version 12.11 to compile and run a C++11 source code file with -std=c++0x of GNU GCC Compiler?

Do the following steps:
  • Open the CodeBlocks program
  • Write a C++11 source code file
  • Click on Menu > Settings > Compiler…
  • Make sure the Global compiler settings icon is selected from the LHS icons menu
  • Check if Selected compiler: GNU GCC Compiler
  • Check if Compiler settings tab is being selected
  • Under the Compiler settings tab, check if Compiler Flags tab is being selected
  • Check if Categories: <All categories>
  • Tick the box: Have g++ follow the coming C++0x ISO C++ language standard [-std=c++0x]
  • Click OK button to close the Compiler settings window
  • To test it, click the "Build and Run" icon from the toolbar
--

No comments:

Measure execution time with Julia, example using sorting algorithms

# random integers between 1 and 100 inclusive, generate thousands of them x = rand ( 1 : 100 , 100000 ) @time sort (x; alg=InsertionSort, r...