Fix compiler error when compile a generated project in Visual Studio