w*****j 发帖数: 49 | 1 Hi, everybody, I'm trying to use gcc to compile a program on my mac. It use
FLTK library. And when i type "g++ -o scratch scratch.c++". it gives the
error:
/usr/bin/ld: Undefined symbols:
Fl::run()
Fl_Widget::Fl_Widget(int, int, int, int, char const*)
Fl_Widget::~Fl_Widget()
Fl_Window::show()
Fl_Window::Fl_Window(int, int, char const*)
Fl_Window::~Fl_Window()
vtable for Fl_Box
collect2: ld returned 1 exit status
Anybody gets any suggestions? Thanks. | t****t 发帖数: 6806 | 2 you used "FLTK library"? where is it? I mean, in your command? You have to
tell linker where to find the library.
use
【在 w*****j 的大作中提到】 : Hi, everybody, I'm trying to use gcc to compile a program on my mac. It use : FLTK library. And when i type "g++ -o scratch scratch.c++". it gives the : error: : /usr/bin/ld: Undefined symbols: : Fl::run() : Fl_Widget::Fl_Widget(int, int, int, int, char const*) : Fl_Widget::~Fl_Widget() : Fl_Window::show() : Fl_Window::Fl_Window(int, int, char const*) : Fl_Window::~Fl_Window()
| w*****j 发帖数: 49 | 3 I installed it. I don't know much about all this stuff. I am learning
Stroustrup's <>. And he use
fltk to teach us GUI. In the code I have already include
.h>. I don't know what I should do. Could you please give me some pointers?
Thank you very much.
【在 t****t 的大作中提到】 : you used "FLTK library"? where is it? I mean, in your command? You have to : tell linker where to find the library. : : use
| z****e 发帖数: 2024 | 4 as thrust told you, you need to link your F**k library.
such like:
g++ -o scratch scratch.c++ -LF**klibrary | w*****j 发帖数: 49 | 5 Hi,I used -lfltk and it sort of change the error message:
Undefined symbols:
_AECountItems
_AECreateDesc
etc.
Am I supposed to link to another library?
【在 z****e 的大作中提到】 : as thrust told you, you need to link your F**k library. : such like: : g++ -o scratch scratch.c++ -LF**klibrary
|
|