compile error

Miika Turkia miika.turkia at gmail.com
Fri Oct 4 22:58:03 UTC 2013


On Sat, Oct 5, 2013 at 8:09 AM, Thiago Macieira <thiago at macieira.org> wrote:

> On sábado, 5 de outubro de 2013 07:34:32, Miika Turkia wrote:
> > g++ -Wall -g -DQT_SHARED -I/usr/include/qt4 -I/usr/include/qt4/QtGui
> > -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtSvg
> > -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtWebKit
> > -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
> > -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
> > -I/usr/include/libxml2 -I/usr/local/include -I/usr/include/libusb-1.0
> > -pthread -I/usr/include/libsoup-2.4 -I/usr/include/libxml2
> > -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
> -I.
> > -DQT_NO_STL -DLIBZIP -I/usr/lib/libzip/include
> > -DXSLT='"/usr/share/subsurface/xslt"' -I/usr/include/libxml2    -c -o
> > qt-ui/preferences.o qt-ui/preferences.cpp
>
> It's still missing part of the command-line
>
>         $(COMPILE_PREFIX)$(CXX) $(CXXFLAGS) $(EXTRA_FLAGS) -I.uic -Iqt-ui
> -MD
> -MF .dep/$@.dep -c -o $@ $<
>
> Note how -I.uic -Iqt-ui -Md -MF .dep/... part is missing.
>
> I really don't get why the template rule isn't getting applied.
>

Removing the $(UIC_HEADERS) from the template definition seems to get the
template to match
---8<---
diff --git a/Rules.mk b/Rules.mk
index a62b1be..729917e 100644
--- a/Rules.mk
+++ b/Rules.mk
@@ -185,7 +185,7 @@ MOCFLAGS = $(filter -I%, $(CXXFLAGS) $(EXTRA_FLAGS))
$(filter -D%, $(CXXFLAGS) $
        @mkdir -p .dep/$(@D)
        $(COMPILE_PREFIX)$(CC) $(CFLAGS) $(EXTRA_FLAGS) -MD -MF .dep/$@.dep
-c -o $@ $<

-%.o: %.cpp $(UIC_HEADERS)
+%.o: %.cpp
        @$(PRETTYECHO) '    CXX' $<
        @mkdir -p .dep/$(@D)
        $(COMPILE_PREFIX)$(CXX) $(CXXFLAGS) $(EXTRA_FLAGS) -I.uic -Iqt-ui
-MD -MF .dep/$@.dep -c -o $@ $<
---8<---

However, I do still get some error when compiling
---8<---
    CXX qt-ui/preferences.cpp
qt-ui/preferences.cpp: In member function ‘void
PreferencesDialog::setUiFromPrefs()’:
qt-ui/preferences.cpp:76:5: error: ‘class Ui::PreferencesDialog’ has no
member named ‘vertical_speed_minutes’
qt-ui/preferences.cpp:77:5: error: ‘class Ui::PreferencesDialog’ has no
member named ‘vertical_speed_seconds’
qt-ui/preferences.cpp: In member function ‘void
PreferencesDialog::setPrefsFromUi()’:
qt-ui/preferences.cpp:114:39: error: ‘class Ui::PreferencesDialog’ has no
member named ‘vertical_speed_minutes’
qt-ui/preferences.cpp: In member function ‘void
PreferencesDialog::syncSettings()’:
qt-ui/preferences.cpp:157:39: error: ‘class Ui::PreferencesDialog’ has no
member named ‘vertical_speed_minutes’
make: *** [qt-ui/preferences.o] Error 1
---8<--

Naturally I have no idea whether the UIC_HEADERS is really needed here or
not. But at least it seems to be the cause of the template not being
triggered on make.

miika
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20131005/1afad94d/attachment.html>


More information about the subsurface mailing list