I have to complete a project for university where I need to be able to optimise using compiler optimisation levels. I am using OpenMP and as a result I have got the gcc-11 compiler from brew. I have watched this video
How do I do this?
Any advice would be appreciated
CodePudding user response:
Optimization levels are specified with -O1
etc, using capital letter O, not lower-case letter o.
Lower-case -o1
specifies that the output file should be 1
, and then out/jacobi2d1
is an input file to be linked, but it is an existing executable and you can't link one executable into another — hence the error from the linker.