View Single Post
Posts: 44 | Thanked: 77 times | Joined on Jan 2012
#8
Originally Posted by AapoRantalainen View Post
Code is not c++11. My compilers do not know -Wnarrowing. I think dropping -Werror is enough. Now I added (and pushed) "-std=gnu++98" to the Makefile_desktop. Is there some side effects for that?

EDIT: Would this be better? -std=c++98
After adding this:
Code:
CFLAGS += -Wall -std=gnu++98 -ggdb -O0 $(DEFINES) `pkg-config --cflags $(DEPS)` -pthread
to the Makefile it still shows errors but the telescope works
With enabled launcher I got this:
Code:
Makefile:85: depend: Nie ma takiego pliku ani katalogu
g++ -M -MM -MG -MP -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread TeleWindow.cpp Main.cpp XTools.cpp Thumbnail.cpp Settings.cpp Mapping.cpp Mappings.cpp Resources.cpp DBus.cpp XEventLoop.cpp Image.cpp MenuReader.cpp LauncherWindow.cpp SectionList.cpp Section.cpp Application.cpp >depend
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread TeleWindow.cpp -o TeleWindow.o
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread Main.cpp -o Main.o
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread XTools.cpp -o XTools.o
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread Thumbnail.cpp -o Thumbnail.o
Thumbnail.cpp: In member function ‘void Thumbnail::redraw()’:
Thumbnail.cpp:500:5: warning: narrowing conversion of ‘((((Thumbnail*)this)->Thumbnail::_clientOffsetX - borderWidth) + Settings::instance()->Settings::textLeftMargin())’ from ‘int’ to ‘short int’ inside { } is ill-formed in C++11 [-Wnarrowing]
Thumbnail.cpp:500:5: warning: narrowing conversion of ‘(((Thumbnail*)this)->Thumbnail::_clientOffsetY - headerHeight)’ from ‘int’ to ‘short int’ inside { } is ill-formed in C++11 [-Wnarrowing]
Thumbnail.cpp:500:5: warning: narrowing conversion of ‘(((((Thumbnail*)this)->Thumbnail::_clientScaledWidth + (borderWidth * 2)) - Settings::instance()->Settings::textLeftMargin()) - Settings::instance()->Settings::textRightMargin())’ from ‘int’ to ‘short unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing]
Thumbnail.cpp:500:5: warning: narrowing conversion of ‘headerHeight’ from ‘int’ to ‘short unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing]
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread Settings.cpp -o Settings.o
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread Mapping.cpp -o Mapping.o
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread Mappings.cpp -o Mappings.o
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread Resources.cpp -o Resources.o
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread DBus.cpp -o DBus.o
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread XEventLoop.cpp -o XEventLoop.o
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread Image.cpp -o Image.o
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread MenuReader.cpp -o MenuReader.o
MenuReader.cpp: In destructor ‘MenuReader::~MenuReader()’:
MenuReader.cpp:158:24: error: ‘close’ was not declared in this scope
MenuReader.cpp: In member function ‘bool MenuReader::hasChange()’:
MenuReader.cpp:396:45: error: ‘read’ was not declared in this scope
make: *** [MenuReader.o] Błąd 1
Thanks man for great job
Attached Images
 
 

The Following User Says Thank You to riv64 For This Useful Post: