To my surprise, when I came back home, problem was gone! Then I realised, its the DOCKING STATION !!! (I only have one docking station at work) Whenever it boots while docked, all console programs are not working, but everything is fine when it isn’t docked.
Breaking News:
The solution to the problem: delete the “Ddocked Profile” located in System Properties -> Hardware tab -> Hardware Profiles
From a compile error to a docking station profile problem, who would have guessed!