Heim  >  Fragen und Antworten  >  Hauptteil

Warum enthält die Nginx-Quell-Dock-Datei < > anstelle von „ “?

Wenn ich mir den Nginx-Quellcode ansehe, sehe ich, dass die Header-Dateien in einem ähnlichen Format enthalten sind. In der IDE wird ein Fehler gemeldet, dass die Datei nicht im Systemverzeichnis gefunden werden kann Verwenden Sie „<>“#include <ngx_core.h> #include <nginx.h>

巴扎黑巴扎黑2713 Tage vor365

Antworte allen(1)Ich werde antworten

  • 巴扎黑

    巴扎黑2017-05-16 17:20:11

    以下节选自ISO/IEC 9899:1999原文:

    # include <h-char-sequence> new-line
    searches a sequence of implementation-defined places for a header identified uniquely by the specified sequence between the < and > delimiters, and causes the replacement of that directive by the entire contents of the header.

    How the places are specified or the header identified is implementation-defined.

    注意到最后了吗,implementation-defined——没人规定说就是系统目录,而且很多编译器的默认行为也不是仅查找系统目录。即使是同一种编译器,具体的行为尚且可能取决于你提供的选项呢,何况C语言编译器五花八门。

    Antwort
    0
  • StornierenAntwort