revisit compile flags for gcc and msvc