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 building #12

Open
MarcelRobitaille opened this issue Jan 20, 2024 · 0 comments
Open

Error building #12

MarcelRobitaille opened this issue Jan 20, 2024 · 0 comments

Comments

@MarcelRobitaille
Copy link
Contributor

I just cloned this repo and got this error doing sudo make install.

meson build
Directory already configured.

Just run your build command (e.g. ninja) and Meson will regenerate as necessary.
If ninja fails, run "ninja reconfigure" or "meson --reconfigure"
to force Meson to regenerate.

If build failures persist, run "meson setup --wipe" to rebuild from scratch
using the same options as passed when configuring the build.
To change option values, run "meson configure" instead.
ninja -C build
ninja: Entering directory `build'
[1/2] Compiling C++ object interception-vimproved.p/interception-vimproved.cpp.o
FAILED: interception-vimproved.p/interception-vimproved.cpp.o
c++ -Iinterception-vimproved.p -I. -I.. -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -g --std=c++2b -O3 -g -Wall -Wextra -Wpedantic -Werror -Wno-unused-parameter -Wno-type-limits -MD -MQ interception-vimproved.p/interception-vimproved.cpp.o -MF interception-vimproved.p/interception-vimproved.cpp.o.d -o interception-vimproved.p/interception-vimproved.cpp.o -c ../interception-vimproved.cpp
../interception-vimproved.cpp:100:7: error: ‘class Intercept’ has virtual functions and accessible non-virtual destructor [-Werror=non-virtual-dtor]
  100 | class Intercept {
      |       ^~~~~~~~~
../interception-vimproved.cpp:141:7: error: base class ‘class Intercept’ has accessible non-virtual destructor [-Werror=non-virtual-dtor]
  141 | class Modifier : public Intercept {
      |       ^~~~~~~~
../interception-vimproved.cpp:141:7: error: ‘class Modifier’ has virtual functions and accessible non-virtual destructor [-Werror=non-virtual-dtor]
../interception-vimproved.cpp:172:7: error: base class ‘class Intercept’ has accessible non-virtual destructor [-Werror=non-virtual-dtor]
  172 | class Layer : public Intercept {
      |       ^~~~~
../interception-vimproved.cpp:172:7: error: ‘class Layer’ has virtual functions and accessible non-virtual destructor [-Werror=non-virtual-dtor]
cc1plus: all warnings being treated as errors
ninja: build stopped: subcommand failed.
make: *** [Makefile:17: build] Error 1

I was able to solve this by adding a virtual default destructor to Intercept:

class Intercept {
public:
  virtual ~Intercept() = default;
...

interception-vimproved: 019e337
cmake: cmake version 3.25.1
ninja: 1.10.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

No branches or pull requests

1 participant