Optimization problem

When I compile my program without optimization flag, it works fine
g++ -std=c++11 -o app `xml2-config --cflags` app.cpp `xml2-config --libs` -static-libgcc -static-libstdc++
When I try
g++ -std=c++11 -o3 app `xml2-config --cflags` app.cpp `xml2-config --libs` -static-libgcc -static-libstdc++
I get this error
g++: error: app: No such file or directory
What's the solution?
Last edited on
-o is not related to optimization, don't replace it. Add the -O3 flag somewhere else. The -o flag expects the output filename to appear after it. Also, I believe flags are case sensitive.
Last edited on
Thanks!
Topic archived. No new replies allowed.