nifskope icon indicating copy to clipboard operation
nifskope copied to clipboard

Compilation error in class `LightingWidget`

Open colingeniet opened this issue 6 years ago • 5 comments

I have the following error when compiling under Linux:

src/ui/widgets/lightingwidget.cpp:72:76: error: incomplete type ‘QAction’ used in nested name specifier
  connect( ui->btnLighting, &QToolButton::toggled, atns.value(3), &QAction::setEnabled );
                                                                            ^~~~~~~~~~

The proposed change fixes it for me, and the program compiles and runs correctly (although I did not do any in depth tests).

colingeniet avatar Aug 08 '18 12:08 colingeniet

You're not specifying what Qt version you're targeting. The current branch compiles just fine under Linux. Both on Travis CI and in my VM with Ubuntu.

https://travis-ci.org/niftools/nifskope/jobs/345104342 https://travis-ci.org/niftools/nifskope/jobs/345104344

If you're using something like Qt 5.10 or Qt 5.11, NifSkope doesn't support these versions yet and that's intentional and due to things other than compile errors.

hexabits avatar Aug 08 '18 13:08 hexabits

Actually, this error may be down to your GCC version, which may or may not be indirectly related to what Qt version you chose. I'd need to know what GCC version you're using as well.

hexabits avatar Aug 08 '18 13:08 hexabits

It is Qt 5.11 indeed, I did not notice that it is not supported. GCC version is 8.2.0.

colingeniet avatar Aug 08 '18 13:08 colingeniet

OK well it's likely the GCC version of 8.2 though, being stricter about forward declarations or something. I will look into it. Is the precompiled binary for 5.11 on Linux actually using GCC 8.2 or did you compile Qt yourself with 8.2?

Because even if you downgraded to Qt 5.7, and compiled that with 8.2 you still may get the error.

I will try to sort out the issues keeping me from using 5.10/5.11 on Windows soon enough, and then that will lead to me attempting to compile on Ubuntu with 5.11 as well.

Looking here though, https://doc.qt.io/qt-5.11/supported-platforms-and-configurations.html, the highest GCC I see that is listed as supported is GCC 7, so you may just want to downgrade your GCC version anyway and I assume then you compiled Qt yourself.

hexabits avatar Aug 08 '18 13:08 hexabits

Same issue on linux, gcc (GCC) 8.3.0 and Qt 5.12.3

The proposed change prevents this issue.

JayFoxRox avatar Jul 21 '19 08:07 JayFoxRox

I've handled this on my dev8 branch as part of #230 so I'm closing this, after 5 years. 🤡

hexabits avatar Sep 04 '23 08:09 hexabits