Error: '_' was not declared in this scope

18 views
Skip to first unread message

Vassilios Grigoriadis

unread,
Nov 7, 2021, 10:19:43 AM11/7/21
to MathGL
Hi,

I built successfully from source libmgl. I added Fl_MathGL.h to my project, added the include path and the parameter to link to the library.

When I compile I get the following error:

Error: '_' was not declared in this scope

for the line:
void toggle_alpha() { toggle(alpha, alpha_bt, _("Graphics/Alpha")); }

and all lines that include _("sometexthere")

I am using fltk v1.3.6 and mathgl v2.4.4 in voidlinux

Any suggestion are welcome.

mathgl....@gmail.com

unread,
Nov 14, 2021, 1:53:25 PM11/14/21
to mat...@googlegroups.com
Hi,

There is a definition of "_" macros in mgl2/define.h (see https://sourceforge.net/p/mathgl/code/HEAD/tree/mathgl-2x/include/mgl2/define.h#l80 ). This is do nothing or call gettext function for translation. So, it looks as if you don't take the whole MathGL library :) .

вс, 7 нояб. 2021 г. в 18:20, Vassilios Grigoriadis <ne...@gapps.auth.gr>:
--
You received this message because you are subscribed to the Google Groups "MathGL" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathgl+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mathgl/755926d7-19e4-4778-96e1-97861beebce5n%40googlegroups.com.


--
Kind regards,
Alexey Balakin
Reply all
Reply to author
Forward
0 new messages