Fuchsia OS build command: fx set --with, produces: Include not allowed

后端 未结 1 812
梦毁少年i
梦毁少年i 2021-01-27 00:41

fuchsia/examples/intl/tz_version_parrot/main.cc uses fxl::CommandLineFromArgcArgv():

#include \"src/lib/fxl/command_line.h\"
...
int main(int argc,          


        
1条回答
  •  不思量自难忘°
    2021-01-27 00:50

    In ./examples/hello_world/cpp/BUILD.gn, extend the hello_world_cpp module declaration with the fxl dependency:

    executable("bin") {
      output_name = "hello_world_cpp"
    
      sources = [ "hello_world.cc" ]
    
      deps = [ "//src/lib/fxl" ] # Add this line
    }
    
    cd fuchsia
    fx set bringup.x64 --with //examples/hello_world
    fx build; fx qemu
    ...
    hello_world_cpp
    hello has_argv0():1
    

    Reference: The same is done in other Fuchsia components that use fxl (link).

    0 讨论(0)
提交回复
热议问题