Skip to content

Fix Linux build: add missing normalbrowserobject.cpp/.h to CMakeLists.txt#656

Open
fanlei wants to merge 2 commits into
WizTeam:2.8.9from
fanlei:fix/linux-build-cmake
Open

Fix Linux build: add missing normalbrowserobject.cpp/.h to CMakeLists.txt#656
fanlei wants to merge 2 commits into
WizTeam:2.8.9from
fanlei:fix/linux-build-cmake

Conversation

@fanlei

@fanlei fanlei commented Jul 13, 2026

Copy link
Copy Markdown

Problem

Building on Linux fails at the link stage with:

undefined reference to `NormalBrowserObject::NormalBrowserObject(WizMainWindow*, QWebEngineView*, QObject*)'

Root cause

share/normalbrowserobject.cpp and share/normalbrowserobject.h are present in the legacy src/src.pro qmake project file but were never added to src/CMakeLists.txt during the migration to CMake, so they're excluded from the build (and never moc'd, since the header declares Q_OBJECT).

Fix

Added both files to the source/header lists in src/CMakeLists.txt.

Build environment

  • OS: Ubuntu 24.04.4 LTS (Noble Numbat)
  • Kernel: 6.17.0-1028-oem
  • Qt: 5.15.13 (system, /usr/lib/x86_64-linux-gnu)
  • CMake: 3.28.3
  • GCC: 13.3.0 (Ubuntu 13.3.0-6ubuntu2~24.04.1)

Testing

Verified a clean cmake + make -j$(nproc) completes successfully and the resulting WizNote binary launches, connects, authenticates, and renders its main window.

fanlei added 2 commits July 13, 2026 01:21
….txt

The share/normalbrowserobject.cpp and .h files were present in the legacy
src/src.pro qmake project file but were never added to src/CMakeLists.txt
during the migration to CMake. This caused a linker error when building on
Linux:

  undefined reference to `NormalBrowserObject::NormalBrowserObject(WizMainWindow*, QWebEngineView*, QObject*)'

Build environment:
  OS: Ubuntu 24.04.4 LTS (Noble Numbat)
  Kernel: 6.17.0-1028-oem
  Qt: 5.15.13 (system, /usr/lib/x86_64-linux-gnu)
  CMake: 3.28.3
  GCC: 13.3.0 (Ubuntu 13.3.0-6ubuntu2~24.04.1)
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