LinuxÒÁµéÔ°ÂÛ̳'s Archiver

coco_rainning ·¢±íÓÚ 2007-10-17 15:53

ÈçºÎÔÚlinuxϱàÒëfltk

ÎÒÏÖÔÚ ÏÂÔØÁËfltkµÄ1.17ÔÚredhat9ÖнøÐÐÁ˰²×°£¬µ«ÊÇÔÚÆô¶¯fluidÉú³É½çÃæºóÈ´²»ÖªµÀ¸ÃÈçºÎÈ¥±àÒ룬ÒòΪ°´ÕÕ°ïÖúÎĵµÀïÌṩµÄhello.cxx ÀûÓÃgcc  £­o myhello myhello.cxx£àfltk£­config  £­£­cxxflag£à £­l£¯usr£¯local£¯lib £­X11 £­Xext  £­lm½øÐбàÒ룬µ«ÊÇÈ´³ö´íÓкܶà´íÎó£¬Ê×ÏÈÊÇX11ÕÒ²»µ½£¬ËæºóÊDz»´æÔÚXext £¬
ÎÒµÄÔ´´úÂëhello.cxx
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Box.H>

int main(int argc, char **argv) {
  Fl_Window *window = new Fl_Window(300,180);
  Fl_Box *box = new Fl_Box(20,40,260,100,"Hello, World!");
  box->box(FL_UP_BOX);
  box->labelsize(36);
  box->labelfont(FL_BOLD+FL_ITALIC);
  box->labeltype(FL_SHADOW_LABEL);
  window->end();
  window->show(argc, argv);
  return Fl::run();
}
ÎÒµ±Ê±ÓõÄÃüÁîÊÇ
gcc `fltk-config --cxxflags` -o myhello hello.cxx  -L/usr/local/lib -I/usr/local/include/FL -lfltk -L/usr/X11R6/lib -lXext -lX11 -lm
±àÒëʱ³öµÄ´íÎó
/tmp/ccOKGP6s.o(.text+0x26): In function `main':
hello.cxx: undefined reference to `operator new(unsigned int)'
/tmp/ccOKGP6s.o(.text+0x53):hello.cxx: undefined reference to `operator new(unsigned int)'
/usr/local/lib/libfltk.a(Fl.o)(.text+0xff): In function `Fl::repeat_timeout(double, void (*)(void*), void*)':
Fl.cxx: undefined reference to `operator new(unsigned int)'
/usr/local/lib/libfltk.a(Fl.o)(.text+0x1fa): In function `Fl::add_check(void (*)(void*), void*)':
Fl.cxx: undefined reference to `operator new[](unsigned int)'
/usr/local/lib/libfltk.a(Fl.o)(.text+0x468):Fl.cxx: undefined reference to `operator delete[](void*)'
/usr/local/lib/libfltk.a(Fl.o)(.text+0x359): In function `Fl::remove_handler(int (*)(int))':
Fl.cxx: undefined reference to `operator delete(void*)'
/usr/local/lib/libfltk.a(Fl.o)(.text+0x13c6): In function `Fl_Window::hide()':
Fl.cxx: undefined reference to `operator delete(void*)'
/usr/local/lib/libfltk.a(Fl.o)(.text+0x13f5): In function `Fl_Window::~Fl_Window()':
Fl.cxx: undefined reference to `operator delete(void*)'
/usr/local/lib/libfltk.a(Fl_Box.o)(.gnu.linkonce.r._ZTI6Fl_Box[typeinfo for Fl_Box]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
/usr/local/lib/libfltk.a(Fl_Box.o)(.gnu.linkonce.t._ZN6Fl_BoxD0Ev[Fl_Box::~Fl_Box()]+0x1c): In function `Fl_Box::~Fl_Box()':
Fl_Box.cxx: undefined reference to `operator delete(void*)'
/usr/local/lib/libfltk.a(Fl_Group.o)(.text+0x4c): In function `Fl_Group::init_sizes()':
Fl_Group.cxx: undefined reference to `operator delete[](void*)'
/usr/local/lib/libfltk.a(Fl_Group.o)(.text+0x6f0): In function `Fl_Group::sizes()':
Fl_Group.cxx: undefined reference to `operator new[](unsigned int)'
/usr/local/lib/libfltk.a(Fl_Group.o)(.text+0x2a3): In function `Fl_Group::~Fl_Group()':
Fl_Group.cxx: undefined reference to `operator delete(void*)'
/usr/local/lib/libfltk.a(Fl_Group.o)(.gnu.linkonce.r._ZTI8Fl_Group[typeinfo for Fl_Group]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
/usr/local/lib/libfltk.a(Fl_arg.o)(.text+0x652): In function `Fl_Window::show(int, char**)':
Fl_arg.cxx: undefined reference to `operator new[](unsigned int)'
/usr/local/lib/libfltk.a(Fl_arg.o)(.text+0x69f):Fl_arg.cxx: undefined reference to `operator delete[](void*)'
/usr/local/lib/libfltk.a(Fl_get_system_colors.o)(.text+0x410): In function `Fl::reload_scheme()':
Fl_get_system_colors.cxx: undefined reference to `operator new(unsigned int)'
/usr/local/lib/libfltk.a(Fl_x.o)(.text+0x725): In function `Fl::copy(char const*, int, int)':
Fl_x.cxx: undefined reference to `operator delete[](void*)'
/usr/local/lib/libfltk.a(Fl_x.o)(.text+0x72f):Fl_x.cxx: undefined reference to `operator new[](unsigned int)'
/usr/local/lib/libfltk.a(Fl_x.o)(.text+0x8d3): In function `Fl_X::set_xid(Fl_Window*, unsigned long)':
Fl_x.cxx: undefined reference to `operator new(unsigned int)'
/usr/local/lib/libfltk.a(Fl_x.o)(.text+0x1150): In function `fl_handle(_XEvent const&)':
Fl_x.cxx: undefined reference to `operator delete[](void*)'
/usr/local/lib/libfltk.a(Fl_x.o)(.text+0x115e):Fl_x.cxx: undefined reference to `operator new[](unsigned int)'
/usr/local/lib/libfltk.a(fl_color.o)(.text+0x3ee): In function `fl_xpixel(Fl_Color)':
fl_color.cxx: undefined reference to `operator new[](unsigned int)'
/usr/local/lib/libfltk.a(fl_font.o)(.text+0x267): In function `fl_font(int, int)':
fl_font.cxx: undefined reference to `operator new(unsigned int)'
/usr/local/lib/libfltk.a(fl_font.o)(.text+0x47c):fl_font.cxx: undefined reference to `operator new(unsigned int)'
/usr/local/lib/libfltk.a(Fl_Image.o)(.text+0xa1): In function `Fl_RGB_Image::~Fl_RGB_Image()':
Fl_Image.cxx: undefined reference to `operator delete[](void*)'
/usr/local/lib/libfltk.a(Fl_Image.o)(.text+0x2ee): In function `Fl_RGB_Image::desaturate()':
Fl_Image.cxx: undefined reference to `operator new[](unsigned int)'
/usr/local/lib/libfltk.a(Fl_Image.o)(.text+0x36f):Fl_Image.cxx: undefined reference to `operator delete[](void*)'
/usr/local/lib/libfltk.a(Fl_Image.o)(.text+0x61c): In function `Fl_RGB_Image::copy(int, int)':
/usr/local/lib/libfltk.a(Fl_Menu_Window.o)(.text+0x47): In function `Fl_Menu_Window::~Fl_Menu_Window()':
Fl_Menu_Window.cxx: undefined reference to `operator delete(void*)'
/usr/local/lib/libfltk.a(Fl_Menu_Window.o)(.gnu.linkonce.r._ZTI14Fl_Menu_Window[typeinfo for Fl_Menu_Window]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
/usr/local/lib/libfltk.a(Fl_Pixmap.o)(.text+0x91): In function `Fl_Pixmap::delete_data()':
Fl_Pixmap.cxx: undefined reference to `operator delete[](void*)'
/usr/local/lib/libfltk.a(Fl_Pixmap.o)(.text+0x2e6): In function `Fl_Pixmap::draw(int, int, int, int, int, int)':
Fl_Pixmap.cxx: undefined reference to `operator delete[](void*)'
/usr/local/lib/libfltk.a(Fl_Pixmap.o)(.text+0x42b): In function `Fl_Pixmap::copy_data()':
Fl_Pixmap.cxx: undefined reference to `operator new[](unsigned int)'
/usr/local/lib/libfltk.a(Fl_Pixmap.o)(.text+0x448):Fl_Pixmap.cxx: undefined reference to `operator new[](unsigned int)'
/usr/local/lib/libfltk.a(Fl_Pixmap.o)(.text+0x711): In function `Fl_Pixmap::desaturate()':
Fl_Pixmap.cxx: undefined reference to `operator delete[](void*)'
/usr/local/lib/libfltk.a(Fl_Pixmap.o)(.text+0x730):Fl_Pixmap.cxx: undefined reference to `operator new[](unsigned int)'
/usr/local/lib/libfltk.a(Fl_Pixmap.o)(.text+0xa5a): In function `Fl_Pixmap::color_average(Fl_Color, float)':
Fl_Pixmap.cxx: undefined reference to `operator delete[](void*)'
/usr/local/lib/libfltk.a(Fl_Pixmap.o)(.text+0xa7d):Fl_Pixmap.cxx: undefined reference to `operator new[](unsigned int)'
/usr/local/lib/libfltk.a(Fl_Pixmap.o)(.text+0xad): In function `Fl_Pixmap::delete_data()':
Fl_Pixmap.cxx: undefined reference to `operator delete[](void*)'
/usr/local/lib/libfltk.a(Fl_Pixmap.o)(.text+0xe2): In function `Fl_Pixmap::~Fl_Pixmap()':
Fl_Pixmap.cxx: undefined reference to `operator delete(void*)'
/usr/local/lib/libfltk.a(Fl_Pixmap.o)(.gnu.linkonce.r._ZTI9Fl_Pixmap[typeinfo for Fl_Pixmap]+0x0): /usr/local/lib/libfltk.a(Fl_Tiled_Image.o)(.text+0xfc): In function `Fl_Tiled_Image::copy(int, int)':
/usr/local/lib/libfltk.a(fl_draw_image.o)(.text+0xded):fl_draw_image.cxx: undefined reference to `operator new[](unsigned int)'
/usr/local/lib/libfltk.a(fl_draw_pixmap.o)(.text+0x21b): In function `fl_draw_pixmap(char const* const*, int, int, Fl_Color)':
fl_draw_pixmap.cxx: undefined reference to `operator new[](unsigned int)'
/usr/local/lib/libfltk.a(fl_draw_pixmap.o)(.text+0x377):fl_draw_pixmap.cxx: undefined reference to `operator new[](unsigned int)'
/usr/local/lib/libfltk.a(fl_draw_pixmap.o)(.text+0x54e):fl_draw_pixmap.cxx: undefined reference to `operator delete[](void*)'/usr/local/lib/libfltk.a(Fl_Bitmap.o)(.text+0x60): In function `fl_create_alphamask(int, int, int, int, unsigned char const*)':
Fl_Bitmap.cxx: undefined reference to `operator new[](unsigned int)'
/usr/local/lib/libfltk.a(Fl_Bitmap.o)(.text+0x103):Fl_Bitmap.cxx: undefined reference to `operator delete[](void*)'
/usr/local/lib/libfltk.a(Fl_Bitmap.o)(.text+0x3d7):Fl_Bitmap.cxx: undefined reference to `operator new(unsigned int)'
/usr/local/lib/libfltk.a(Fl_Bitmap.o)(.text+0x1d3): In function `Fl_Bitmap::~Fl_Bitmap()':
Fl_Bitmap.cxx: undefined reference to `operator delete(void*)'
/usr/local/lib/libfltk.a(Fl_Bitmap.o)(.gnu.linkonce.r._ZTI9Fl_Bitmap[typeinfo for Fl_Bitmap]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
/usr/local/lib/libfltk.a(Fl_Button.o)(.gnu.linkonce.t._ZN9Fl_ButtonD0Ev[Fl_Button::~Fl_Button()]+0x1c): In function `Fl_Button::~Fl_Button()':
Fl_Button.cxx: undefined reference to `operator delete(void*)'
collect2: ld returned 1 exit status






Õâ¸ö´íÎó³¤ÁËЩËùÒÔÖ»°Ñ×îÖØÒªµÄ´«ÁËÉÏÀ´¡£»¹Çë¶à¶àÖ¸µã¡£

Çë¸÷λ¸ßÊÖÖ¸µãÒ»¶þ£¬²»Ê¤¸Ð¼¤£¡¶àл£¡

coco_rainning ·¢±íÓÚ 2007-10-18 22:26

Çë¸÷λ°ï°ïæ°É£¡

ÎÒ½ñÌìÓÖÊÔÁËÒ»Ì쵫ÊÇÈÔÈ»±à²»¹ýÈ¥£¬»¹Çë¸÷λ¸ßÊÖ°ï°ï棡
¶àл£¡£¡

AIKO_sex ·¢±íÓÚ 2007-10-18 22:34

ûÓа²×°»òÕß°²×°È«xfree86¿ª·¢°ü

Ò³: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.