0

This is the first time I am trying to build something from the source codes. I was trying to make a console program out of WebRTC native code.

I followed official guide and checked out the source code.

As the guide says,

To generate IDE project files, pass the --ide flag to the GN command. See the GN reference for more details on the supported IDEs.

I used this command to generate Xcode project:

$ gn gen out/Default --ide=xcode

But the Xcode project generated does not compile. Xcode kept telling me it could not find those files.

Is it because I did not do ninja -C out/Default? I am confused — am I supposed to still compile the whole source codes using ninja while I have generated an Xcode project using gn?

jackxujh
  • 983
  • 10
  • 31

2 Answers2

0

am I supposed to still compile the whole source codes using ninja while I have generated an Xcode project using gn? => yes

Dr. Alex Gouaillard
  • 2,078
  • 14
  • 13
  • That is what I tried. But Xcode still reports errors when compiling. Is the generated Xcode project only meant to manage all source files, but not to be used for compiling and building? – jackxujh Apr 16 '18 at 16:22
  • you understand correctly. you are still compiling with ninja under the hood. – Dr. Alex Gouaillard Apr 17 '18 at 10:59
0

See https://dev.chromium.org/developers/how-tos/debugging-on-os-x/building-with-ninja-debugging-with-xcode for further details on building with Ninja and debugging with Xcode.

Gary
  • 4,426
  • 1
  • 22
  • 19