Comment 13 for bug 1379100

Revision history for this message
Martin Spacek (mspacek) wrote :

Adam, I tried building your example, but I get this compile error on make. This is in Xubuntu 14.04 amd64:

mspacek@Escher:~/Desktop/tile-artefact$ qmake
mspacek@Escher:~/Desktop/tile-artefact$ make
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I/usr/include/poppler/qt4 -I/usr/include/poppler -I. -o tile-artefact.o tile-artefact.cpp
tile-artefact.cpp:39:5: warning: identifier ‘constexpr’ is a keyword in C++11 [-Wc++0x-compat]
     constexpr auto r = 96.47;
     ^
tile-artefact.cpp: In function ‘int main(int, char**)’:
tile-artefact.cpp:23:47: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
     const QScopedPointer< Poppler::Document > document{ Poppler::Document::load(arguments.at(1)) };
                                               ^
tile-artefact.cpp:23:98: error: in C++98 ‘document’ must be initialized by constructor, not by ‘{...}’
     const QScopedPointer< Poppler::Document > document{ Poppler::Document::load(arguments.at(1)) };
                                                                                                  ^
tile-artefact.cpp:31:43: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
     const QScopedPointer< Poppler::Page > page{ document->page(0) };
                                           ^
tile-artefact.cpp:31:67: error: in C++98 ‘page’ must be initialized by constructor, not by ‘{...}’
     const QScopedPointer< Poppler::Page > page{ document->page(0) };
                                                                   ^
tile-artefact.cpp:39:5: error: ‘constexpr’ was not declared in this scope
     constexpr auto r = 96.47;
     ^
tile-artefact.cpp:39:15: error: expected ‘;’ before ‘auto’
     constexpr auto r = 96.47;
               ^
tile-artefact.cpp:40:15: error: expected ‘;’ before ‘auto’
     constexpr auto x = 0, y = 531;
               ^
tile-artefact.cpp:41:15: error: expected ‘;’ before ‘auto’
     constexpr auto w = 410, h = 530;
               ^
tile-artefact.cpp:44:5: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
     auto image = page->renderToImage(r, r, -1, -1, -1, -1);
     ^
tile-artefact.cpp:44:10: error: ‘image’ does not name a type
     auto image = page->renderToImage(r, r, -1, -1, -1, -1);
          ^
tile-artefact.cpp:46:5: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
     auto label = new QLabel();
     ^
tile-artefact.cpp:46:10: error: ‘label’ does not name a type
     auto label = new QLabel();
          ^
tile-artefact.cpp:47:5: error: ‘label’ was not declared in this scope
     label->setWindowTitle("Full page");
     ^
tile-artefact.cpp:48:41: error: ‘image’ was not declared in this scope
     label->setPixmap(QPixmap::fromImage(image));
                                         ^
tile-artefact.cpp:54:33: error: ‘r’ was not declared in this scope
     image = page->renderToImage(r, r, x, y, w, h);
                                 ^
tile-artefact.cpp:54:39: error: ‘x’ was not declared in this scope
     image = page->renderToImage(r, r, x, y, w, h);
                                       ^
tile-artefact.cpp:54:42: error: ‘y’ was not declared in this scope
     image = page->renderToImage(r, r, x, y, w, h);
                                          ^
tile-artefact.cpp:54:45: error: ‘w’ was not declared in this scope
     image = page->renderToImage(r, r, x, y, w, h);
                                             ^
tile-artefact.cpp:54:48: error: ‘h’ was not declared in this scope
     image = page->renderToImage(r, r, x, y, w, h);
                                                ^
make: *** [tile-artefact.o] Error 1