Build project using g++

how would i go about using the g++ command to build my project I dont like using visual studio or the make file I was wondering if there was a way to do it using the g++ command in the terminal like how you can do with other libs.

like for example this is how to build a exe with the SDL2 graphics lib and I want to know if theres a way to build openFrameworks this way too.

g++ helloworld.cpp -IC:/c-libs/include/SDL2 -LC:/c-libs/lib -w -Wl,-subsystem,windows -lmingw32 -lSDL2main -lSDL2 -o run.exe