You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C++ code generated by protoc (protobuf compiler) can lead to parsing errors when generating C++ code or config with plcncli using one of the following commands:
plcncli generate code
plcncli generate config
plcncli generate all
Error looks like this:
exchange.pb.h(407,0): error CPP0005: A parsing exception was thrown.
parsing exception occured while parsing 'brace_group' expected '(skip([}]) + skip(multiline_ws*))' at line number 407, and character number 0
A fix has been documented on the PLCNext Community forum (here).
You have to move all your protoc generated C++ files from src to another directory. For example, rpc/. To include these files during compilation, you have to update the CMakeLists.txtconfiguration. For example, if we moved the files to a rpc/ folder like mentioned earlier, it can be done like this:
Alternatively, you can generate code/config files with plcncli before generating code with protoc. For instance, this fix can be used if the project is compiled with a script:
#!bin/bash
plcncli generate all
protoc --cpp_out=./ file.proto
plcncli build
The text was updated successfully, but these errors were encountered:
C++ code generated by protoc (protobuf compiler) can lead to parsing errors when generating C++ code or config with plcncli using one of the following commands:
Error looks like this:
A fix has been documented on the PLCNext Community forum (here).
You have to move all your
protoc
generated C++ files fromsrc
to another directory. For example,rpc/
. To include these files during compilation, you have to update theCMakeLists.txt
configuration. For example, if we moved the files to arpc/
folder like mentioned earlier, it can be done like this:Alternatively, you can generate code/config files with plcncli before generating code with protoc. For instance, this fix can be used if the project is compiled with a script:
The text was updated successfully, but these errors were encountered: