Skip to content

Conversation

@leroymusa
Copy link

This PR fixes compilation and linker errors that occur when building zkanji on Ubuntu 22.04 with gcc 13.

Issues Fixed

1. Linker Errors for GroupCategory Template

Problem: The build failed with undefined reference errors:

  • undefined reference to 'GroupCategory<KanjiGroup>::categories(int)'
  • undefined reference to 'GroupCategory<WordGroup>::categories(int)'

Solution: Added explicit template instantiations for the categories() method in groups.cpp to ensure the linker can find the required symbols.

2. Missing Header Include

Problem: Compilation error due to missing #include <cstdint> in checked_cast.h on gcc 13.

Solution: Added the required include directive.

3. Duplicate Using Declarations

Problem: Duplicate using QComboBox::activated; declaration in zcolorcombobox.h causing compilation errors.

Solution: Commented out the duplicate declarations.

Changes Made

  • groups.cpp: Added explicit template instantiations for GroupCategory<KanjiGroup> and GroupCategory<WordGroup> specializations
  • checked_cast.h: Added #include <cstdint> header
  • zcolorcombobox.h: Fixed duplicate using declarations
  • .gitignore: Updated to exclude Qt build artifacts and generated files

Platform

Tested on: Ubuntu 22.04 with gcc 13 and Qt 5

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

Successfully merging this pull request may close these issues.

1 participant