On 14 Sep 2021, at 14:27, Steven A. Falco <stevenfalco@xxxxxxxxx
<mailto:stevenfalco@xxxxxxxxx>> wrote:
It looks like the problem is that the definition of T_kicad_wks
appears in a generated file: include/page_layout_reader_lexer.h
However, while I do "out of tree" builds, page_layout_reader_lexer.h
is not created in the build directory, but rather it is created in
the source directory.
So when I deleted my build directory to force a clean build,
page_layout_reader_lexer.h was not deleted / re-created, hence the
new definition was not found.
Is the intention to have page_layout_reader_lexer.h be created in the
source directory or in the build directory?
Steve
On 9/13/21 17:17, Steven A. Falco wrote:
I'm getting the following error compiling the 5.1 branch:
/home/sfalco/src/kicad/kicad5/gitlab/code/kicad-5.1/common/page_layout/page_layout_reader.cpp:
In member function ‘void
PAGE_LAYOUT_READER_PARSER::Parse(WORKSHEET_LAYOUT*)’:
/home/sfalco/src/kicad/kicad5/gitlab/code/kicad-5.1/common/page_layout/page_layout_reader.cpp:131:22:
error: ‘T_kicad_wks’ was not declared in this scope
131 | if( token == T_kicad_wks || token == T_drawing_sheet )
| ^~~~~~~~~~~
/home/sfalco/src/kicad/kicad5/gitlab/code/kicad-5.1/common/page_layout/page_layout_reader.cpp:131:46:
error: ‘T_drawing_sheet’ was not declared in this scope
131 | if( token == T_kicad_wks || token == T_drawing_sheet )
| ^~~~~~~~~~~~~~~
This appears to be due to commit 2975e859500, which added this code:
+ if( token == T_kicad_wks || token == T_drawing_sheet )
+ {
+ THROW_PARSE_ERROR( _( "KiCad was unable to open this
file because it was created with "
+ "a more recent version than the
one you are running.\n\n"
+ "To open it you will need to
upgrade KiCad to 5.99 or later." ),
+ CurSource(), CurLine(),
CurLineNumber(), CurOffset() );
+ }
+
Steve
_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
<https://launchpad.net/~kicad-developers>
Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
<mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
Unsubscribe : https://launchpad.net/~kicad-developers
<https://launchpad.net/~kicad-developers>
More help : https://help.launchpad.net/ListHelp
<https://help.launchpad.net/ListHelp>