I am just starting out with c++, so I can't really make sense of this. If
someone could possibly tell me what might be going wrong, then I would be very
grateful for that.
Thanks
Michael
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
After browsing the forum a bit I suspect that I need to set some options (QT,
FLTK etc.) during compilation. I'll give this a try. Apologies for the
(possible) fuss.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You need to enable Qt and FLTK options if you plan to use windows/widgets. In
yours case it look as you forgot to add linker option -lmgl for linking MathGL
library.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am trying to compile the first example from the documentation: 2.1.1 Using
MathGL window on Mac OSX 10.7.3 (Lion), but when I try
g++ example.cpp -o example
I get the following error:
Undefined symbols for architecture x86_64:
"_mgl_set_font_size", referenced from:
mglGraph::SetFontSize(float) in ccPc8wMp.o
"_mgl_create_graph_gl", referenced from:
mglGraph::mglGraph(int, int, int)in ccPc8wMp.o
"_mgl_create_graph", referenced from:
mglGraph::mglGraph(int, int, int)in ccPc8wMp.o
"_mgl_use_graph", referenced from:
mglGraph::~mglGraph()in ccPc8wMp.o
mglGraph::~mglGraph()in ccPc8wMp.o
mglGraph::~mglGraph()in ccPc8wMp.o
"_mgl_delete_graph", referenced from:
mglGraph::~mglGraph()in ccPc8wMp.o
mglGraph::~mglGraph()in ccPc8wMp.o
mglGraph::~mglGraph()in ccPc8wMp.o
"mgl_draw_graph(mglBase, void)", referenced from:
mglWindow::mglWindow(int ()(mglGraph), char const, int)in ccPc8wMp.o
"_mgl_create_graph_qt", referenced from:
mglWindow::mglWindow(int ()(mglGraph), char const, int)in ccPc8wMp.o
"_mgl_create_graph_fltk", referenced from:
mglWindow::mglWindow(int ()(mglGraph), char const, int)in ccPc8wMp.o
"_mgl_qt_run", referenced from:
mglWindow::Run() in ccPc8wMp.o
"_mgl_fltk_run", referenced from:
mglWindow::Run() in ccPc8wMp.o
"_mgl_rotate", referenced from:
mglGraph::Rotate(float, float, float)in ccPc8wMp.o
"_mgl_box_str", referenced from:
mglGraph::Box(char const, bool)in ccPc8wMp.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
I am just starting out with c++, so I can't really make sense of this. If
someone could possibly tell me what might be going wrong, then I would be very
grateful for that.
Thanks
Michael
After browsing the forum a bit I suspect that I need to set some options (QT,
FLTK etc.) during compilation. I'll give this a try. Apologies for the
(possible) fuss.
You need to enable Qt and FLTK options if you plan to use windows/widgets. In
yours case it look as you forgot to add linker option -lmgl for linking MathGL
library.