--
You received this message because you are subscribed to a topic in the Google Groups "PPP-public" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ppp-public/BtlzdWGuQpQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ppp-public+...@googlegroups.com.
To post to this group, send email to ppp-p...@googlegroups.com.
Visit this group at http://groups.google.com/group/ppp-public.
For more options, visit https://groups.google.com/d/optout.
Graph.h:159:25: warning: narrowing conversion of ‘fl_color()’ from ‘Fl_Color {aka unsigned int}’ to ‘int’ inside { } [-Wnarrowing]
Color lcolor {fl_color()};
The solution being to edit line 29 of the same file to:Hi all. Just started on C++ programming and finally got to GUI part of PPP2. Thanks for figuring this out for us. It worked for me using openSuse dist.
--
You received this message because you are subscribed to a topic in the Google Groups "PPP-public" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ppp-public/BtlzdWGuQpQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ppp-public+unsubscribe@googlegroups.com.
To post to this group, send email to ppp-p...@googlegroups.com.
Visit this group at https://groups.google.com/group/ppp-public.
#include "Fl/Fl_JPEG_Image.H" #include "Fl/Fl_GIF_Image.H"
to
#include "FL/Fl_JPEG_Image.H" #include "FL/Fl_GIF_Image.H"
====Graph.cpp line 313 ======== [1]
from
return ff;
to
return static_cast<bool>(ff);
==========
My system is Freebsd using Clang(LLVM) compiler
And FLTK 1.3.3
The command line used:
CC -I/usr/local/include -L/usr/local/lib `fltk-config --ldflags --use-images` -std=c++11 *.cpp
I've attached the final version which use:
1- Thejoh modification
2- Gregory modification
3- My modification
[1] Edit before sending: I have now seen that Anthony has also created another solution to the "return ff" problem.
---------------------------------------------
Werschulz,
using FreeBSD+Clang with -Wall option gives also:
[...]
./Window.h:25:7: warning: 'Graph_lib::Window::resize' hides overloaded virtual function [-Woverloaded-virtual]
void resize(int ww, int hh) { w=ww, h=hh; size(ww,hh); }
^
/usr/local/include/FL/Fl_Window.H:261:16: note: hidden overloaded virtual function 'Fl_Window::resize' declared
here: different number of parameters (4 vs 2)
virtual void resize(int X,int Y,int W,int H);
^
[...]
But my window is being drawn correctly:duplicate symbol 'get_rand()' in:
Graph.o
Simple_window.o
duplicate symbol 'seed_randint(int)' in:
Graph.o
Simple_window.o
duplicate symbol 'get_rand()' in:
Graph.o
Window.o
duplicate symbol 'seed_randint(int)' in:
Graph.o
Window.o
duplicate symbol 'get_rand()' in:
Graph.o
GUI.o
duplicate symbol 'seed_randint(int)' in:
Graph.o
GUI.o
duplicate symbol 'get_rand()' in:
Graph.o
fltk_test.o
duplicate symbol 'seed_randint(int)' in:
Graph.o
fltk_test.o
I fixed it by commenting out the get_rand() and seed_randint() functions in std_lib_facilities.
Graph.cpp: In function ‘bool Graph_lib::can_open(const string&)’:
Graph.cpp:313:9: error: cannot convert ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} to ‘bool’ in return
313 | return ff;
return ff;
return static_cast <bool> (ff);
/usr/bin/ld: /tmp/ccQx8RDh.o: in function `get_rand()':
Window.cpp:(.text+0x0): multiple definition of `get_rand()';
/tmp/ccYLFDUi.o:Graph.cpp:(.text+0x0): first defined here
/usr/bin/ld: /tmp/ccQx8RDh.o: in function `seed_randint(int)':
Window.cpp:(.text+0x77): multiple definition of `seed_randint(int)';
/tmp/ccYLFDUi.o:Graph.cpp:(.text+0x77): first defined here
/usr/bin/ld: /tmp/ccWUjcih.o: in function `get_rand()':
GUI.cpp:(.text+0x0): multiple definition of `get_rand()';
/tmp/ccYLFDUi.o:Graph.cpp:(.text+0x0): first defined here
/usr/bin/ld: /tmp/ccWUjcih.o: in function `seed_randint(int)'
:GUI.cpp:(.text+0x77): multiple definition of `seed_randint(int)';
/tmp/ccYLFDUi.o:Graph.cpp:(.text+0x77): first defined here
/*
default_random_engine& get_rand()
{
static default_random_engine ran;
return ran;
};
// void seed_randint(int s) { get_rand().seed(s); }
inline int randint(int min, int max) { return uniform_int_distribution<>{min, max}(get_rand()); }
inline int randint(int max) { return randint(0, max); }
*/