Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error occurs when compiling the path example/cmake. #9

Open
zwz214 opened this issue Dec 30, 2024 · 0 comments
Open

Error occurs when compiling the path example/cmake. #9

zwz214 opened this issue Dec 30, 2024 · 0 comments

Comments

@zwz214
Copy link

zwz214 commented Dec 30, 2024

image

automotive-bus-schema/examples/cmake$ make
mkdir build;
cd build; cmake ..
-- The C compiler identification is GNU 10.2.1
-- The CXX compiler identification is GNU 10.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/repo/examples/cmake/build
cd build; make
make[1]: Entering directory '/tmp/repo/examples/cmake/build'
make[2]: Entering directory '/tmp/repo/examples/cmake/build'
make[3]: Entering directory '/tmp/repo/examples/cmake/build'
Scanning dependencies of target example
make[3]: Leaving directory '/tmp/repo/examples/cmake/build'
make[3]: Entering directory '/tmp/repo/examples/cmake/build'
[ 20%] Building C object CMakeFiles/example.dir/example.c.o
In file included from /tmp/repo/examples/cmake/../../dist/automotive-bus-schema/flatbuffers/c/automotive_bus_schema/signal/flatbuffers_common_reader.h:9,
from /tmp/repo/examples/cmake/../../dist/automotive-bus-schema/flatbuffers/c/automotive_bus_schema/signal/channel_reader.h:7,
from /tmp/repo/examples/cmake/../../dist/automotive-bus-schema/flatbuffers/c/automotive_bus_schema/signal/channel_builder.h:7,
from /tmp/repo/examples/cmake/example.c:6:
/tmp/repo/examples/cmake/example.c: In function 'main':
/tmp/repo/examples/cmake/example.c:10:42: error: too many arguments to function 'AutomotiveBus_Signal_Channel_SignalWrite_create'
10 | #define ns(x) FLATBUFFERS_WRAP_NAMESPACE(AutomotiveBus_Signal_Channel, x)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/repo/examples/cmake/../../dist/automotive-bus-schema/flatbuffers/c/automotive_bus_schema/flatcc/include/flatcc/flatcc_flatbuffers.h:42:54: note: in definition of macro 'FLATBUFFERS_WRAP_NAMESPACE'
42 | #define FLATBUFFERS_WRAP_NAMESPACE(ns, x) ns ## _ ## x
| ^
/tmp/repo/examples/cmake/example.c:49:15: note: in expansion of macro 'ns'
49 | message = ns(MessageType_as_SignalWrite(
| ^~
/tmp/repo/examples/cmake/example.c:10:15: note: in expansion of macro 'FLATBUFFERS_WRAP_NAMESPACE'
10 | #define ns(x) FLATBUFFERS_WRAP_NAMESPACE(AutomotiveBus_Signal_Channel, x)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/repo/examples/cmake/example.c:50:9: note: in expansion of macro 'ns'
50 | ns(SignalWrite_create(B,
| ^~
In file included from /tmp/repo/examples/cmake/example.c:6:
/tmp/repo/examples/cmake/../../dist/automotive-bus-schema/flatbuffers/c/automotive_bus_schema/signal/channel_builder.h:155:62: note: declared here
155 | static inline AutomotiveBus_Signal_Channel_SignalWrite_ref_t AutomotiveBus_Signal_Channel_SignalWrite_create(flatbuffers_builder_t *B __AutomotiveBus_Signal_Channel_SignalWrite_formal_args)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[3]: *** [CMakeFiles/example.dir/build.make:82: CMakeFiles/example.dir/example.c.o] Error 1
make[3]: Leaving directory '/tmp/repo/examples/cmake/build'
make[2]: *** [CMakeFiles/Makefile2:95: CMakeFiles/example.dir/all] Error 2
make[2]: Leaving directory '/tmp/repo/examples/cmake/build'
make[1]: *** [Makefile:149: all] Error 2
make[1]: Leaving directory '/tmp/repo/examples/cmake/build'
make: *** [Makefile:18: all] Error 2
make: *** [Makefile:25: build_docker] Error 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant