Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
My ubuntu is 14.04, the default gcc and g++ is 4.8, I installed gcc and g++ 4.4 manually, so how can I specify the older version of gcc to call when I compile a program?
I'd say you might be asking for problems as some of the bindings generated on the older versions of the compiler might not be compatible with the later operating system. So things using shared object libraries might have difficulty. Why not just use the latest version?
gcc-4.4
,gcc-4.6
, etc., but depending on how you installed, that may not work.