Ошибка error C2491: 'std::endl' : definition of dllimport function not allowed

error C2491: 'std::endl' : definition of dllimport function not allowed

Если вы собираете PHP расширение, то поможет вот такая вот добавка в файл zend_config.w32.h (пробелы внутри угловых скобок не нужны):

 #include < string > 

Именно string, а не string.h