-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Description
Cpp, effective, e.g.
./flatc.exe --cpp --gen-object-api --scoped-enums --keep-prefix -I ../common/models/data_struct -I ../common/project -I ./filter device_config_data_schema.fbs
we can get the right prefix-path:
“
#include "flatbuffers/flatbuffers.h"
// Ensure the included flatbuffers.h is the same version as when this file was
// generated, otherwise it may not be compatible.
static_assert(FLATBUFFERS_VERSION_MAJOR == 25 &&
FLATBUFFERS_VERSION_MINOR == 12 &&
FLATBUFFERS_VERSION_REVISION == 19,
"Non-compatible flatbuffers version included");
#include "../common/models/data_struct/param_data_schema_generated.h"
#include "../common/project/project_info_schema_generated.h"
#include "filter/device_filter_data_schema_generated.h"
namespace DevCfgDataSchema { ...
”
When Dart, invalid :
./flatc.exe --dart --keep-prefix -o ../../lib/src/device_config -I ../common/models/data_struct -I ../common/project -I ./filter device_config_data_schema.fbs
we get the invalid prefix-path:
"
library dev_cfg_data_schema;
import 'dart:typed_data' show Uint8List;
import 'package:flat_buffers/flat_buffers.dart' as fb;
import './device_filter_data_schema_device_filter_data_schema_generated.dart' as device_filter_data_schema;
import './param_data_schema_device_info_schema_generated.dart' as device_info_schema;
import './project_info_schema_project_info_schema_generated.dart' as project_info_schema;
"