c++ - Digital Mars and Fltk
- Karol Gottan (21/21) Jan 26 2004 Hi,
- Walter (4/15) Jan 26 2004 Try casting the arguments to the types for the particular function you w...
- Karol Gottan (9/27) Jan 27 2004 That was the first step I tried.
- Walter (3/29) Jan 27 2004 Can you give a complete code snippet illustrating the problem?
- Karol Gottan (31/32) Jan 28 2004 Something like this one :
- Walter (2/2) Jan 28 2004 Ok. To work around, I suggest commenting out the declaration not needed.
- Karol Gottan (6/8) Jan 28 2004 That's what I did. And I have to say I am after a
Hi, I am trying to cmpile Fltk GUI (www.fltk.org) using DMC, but I am getting some errors. One of them is a problem with overloaded functions like : ------- src\Fl_Pixmap.cxx(52) : Error: ambiguous reference to symbol Had: fl_measure_pixmap(char *const *, int &, int &) and: fl_measure_pixmap(char const *const *, int &, int &) fl_draw_pixmap(data(), 0, 0, FL_BLACK); ------- and ------- src\Fl_Pixmap.cxx(87) : Error: ambiguous reference to symbol Had: fl_draw_pixmap(char *const *, int, int, int enum Fl_Color) and: fl_draw_pixmap(char const *const *, int, int, int enum Fl_Color) ------- Is there a quick solution for this kind of errors ? (I am rather lammer in C++). -- Karol Gottan
Jan 26 2004
"Karol Gottan" <gottan op.pl> wrote in message news:bv2v0h$937$1 digitaldaemon.com...Hi, I am trying to cmpile Fltk GUI (www.fltk.org) using DMC, but I am getting some errors. One of them is a problem with overloaded functions like : ------- src\Fl_Pixmap.cxx(52) : Error: ambiguous reference to symbol Had: fl_measure_pixmap(char *const *, int &, int &) and: fl_measure_pixmap(char const *const *, int &, int &) fl_draw_pixmap(data(), 0, 0, FL_BLACK); -------Try casting the arguments to the types for the particular function you want to call.
Jan 26 2004
<walter digitalmars.com> wrote :"Karol Gottan" <gottan op.pl> wrote in message news:bv2v0h$937$1 digitaldaemon.com...That was the first step I tried. But it does not help with DMC. Not with this overloading type : int draw( char* const* data, int x, int y); int draw(const char* const* data, int x, int y); In this case casting does not work in DMC. -- KarolHi, I am trying to cmpile Fltk GUI (www.fltk.org) using DMC, but I am getting some errors. One of them is a problem with overloaded functions like : ------- src\Fl_Pixmap.cxx(52) : Error: ambiguous reference to symbol Had: fl_measure_pixmap(char *const *, int &, int &) and: fl_measure_pixmap(char const *const *, int &, int &) fl_draw_pixmap(data(), 0, 0, FL_BLACK); -------Try casting the arguments to the types for the particular function you want to call.
Jan 27 2004
"Karol Gottan" <gottan op.pl> wrote in message news:bv6fn2$jo$1 digitaldaemon.com...<walter digitalmars.com> wrote :Can you give a complete code snippet illustrating the problem?"Karol Gottan" <gottan op.pl> wrote in message news:bv2v0h$937$1 digitaldaemon.com...That was the first step I tried. But it does not help with DMC. Not with this overloading type : int draw( char* const* data, int x, int y); int draw(const char* const* data, int x, int y); In this case casting does not work in DMC.Hi, I am trying to cmpile Fltk GUI (www.fltk.org) using DMC, but I am getting some errors. One of them is a problem with overloaded functions like : ------- src\Fl_Pixmap.cxx(52) : Error: ambiguous reference to symbol Had: fl_measure_pixmap(char *const *, int &, int &) and: fl_measure_pixmap(char const *const *, int &, int &) fl_draw_pixmap(data(), 0, 0, FL_BLACK); -------Try casting the arguments to the types for the particular function you want to call.
Jan 27 2004
Walter wrote:Can you give a complete code snippet illustrating the problem?Something like this one : ---------------------------------------------- #include <stdio.h> class foo { public: explicit foo( char * const * D) {}; explicit foo(const char * const * D) {}; int draw( char * const * data, int x, int y); int draw(const char * const * data, int x, int y); }; int foo::draw(char * const * data, int x, int y) { return draw( (const char * const * )data, x, y ); } int foo::draw(const char * const * data, int x, int y) { return 1; } static const char *broken[] = { "16 24 4 1", NULL }; static foo bar( (const char * const * )broken ); int main(int argv, char **arvc) { bar.draw( broken, 0, 0 ); return 0; } ---------------------------------------------- -- Karol
Jan 28 2004
Ok. To work around, I suggest commenting out the declaration not needed. Thanks, -Walter
Jan 28 2004
<walter digitalmars.com> wrote :Ok. To work around, I suggest commenting out the declaration not needed.That's what I did. And I have to say I am after a successfull compilation of Fltk now. Works great. Many thanks. -- Karol
Jan 28 2004