Missing includes in GN on Windows MSVC

16 views
Skip to first unread message

Aitor Gomila

unread,
Mar 15, 2026, 10:00:40 AM (9 days ago) Mar 15
to gn-dev
I am trying to compile Skia in Windows MSVC, but I am getting errors when compiling `gn`. On linux it works fine. In MSVC, however, it seems I'm getting some missing include errors.
I don't know how I am supposed to send PRs, but here are the necessary changes.

src/gn/escape.h: missing #include <string> (used in line 69)
src/gn/filesystem_utils_unittest.cc: missing #include <chrono> (used in line 77)

If someone tells me how to push the changes, I can do it myself.

David Turner

unread,
Mar 16, 2026, 9:03:31 AM (8 days ago) Mar 16
to Aitor Gomila, gn-dev
On Sun, Mar 15, 2026 at 3:00 PM Aitor Gomila <gomila...@gmail.com> wrote:
I am trying to compile Skia in Windows MSVC, but I am getting errors when compiling `gn`. On linux it works fine. In MSVC, however, it seems I'm getting some missing include errors.
I don't know how I am supposed to send PRs, but here are the necessary changes.

Thanks for reporting this, but which version of the GN sources are you using exactly (see below)?
 
src/gn/escape.h: missing #include <string> (used in line 69)

Surprisingly, this has been fixed more than one year ago: https://gn-review.git.corp.google.com/c/gn/+/17921
 
src/gn/filesystem_utils_unittest.cc: missing #include <chrono> (used in line 77)

There doesn't seem any use of <chrono> features in this file anymore !?
 
If someone tells me how to push the changes, I can do it myself.

Please see the instructions for sending patches at https://gn.googlesource.com/gn/+/main/README.md#sending-patches 

Regards

- Digit

To unsubscribe from this group and stop receiving emails from it, send an email to gn-dev+un...@chromium.org.
Reply all
Reply to author
Forward
0 new messages