User forums > Using Code::Blocks
How to solve the problems of FLTK in Code::Blocks
hrz:
--- Quote from: Miguel Gimenez on June 18, 2021, 02:24:08 pm ---Did you remove 5.1 version completely?
Post a full rebuild log, read this
--- End quote ---
I am so sorry that I make a mistake! The stroutrup has said: Beware: this is code recovered from a loss of my previous website and my contain errors. Bug fixes and corrections are welcome. But I haven seen it. I am so sorry!
hrz:
--- Quote from: Miguel Gimenez on June 18, 2021, 02:24:08 pm ---Did you remove 5.1 version completely?
Post a full rebuild log, read this
--- End quote ---
I have changed the code now. But I still failed. The compile message is:
1.clang++ -L/home/hrz/fltk-sdk/lib -o bin/Debug/graph obj/Debug/Graph.o obj/Debug/GUI.o obj/Debug/main.o obj/Debug/Simple_window.o obj/Debug/Window.o /usr/local/lib/libfltk.a -lXrender -lXcursor -lXfixes -lXext -lXft -lfontconfig -lpthread -ldl -lm -lX11 /home/hrz/fltk-sdk/lib/libfltk.a /home/hrz/fltk-sdk/lib/libfltk_forms.a /home/hrz/fltk-sdk/lib/libfltk_gl.a /home/hrz/fltk-sdk/lib/libfltk_images.a
/usr/bin/ld: /home/hrz/fltk-sdk/lib/libfltk_images.a(Fl_JPEG_Image.cxx.o): in function `Fl_JPEG_Image::Fl_JPEG_Image(char const*)':
Fl_JPEG_Image.cxx:(.text+0xea): undefined reference to `jpeg_std_error'
/usr/bin/ld: Fl_JPEG_Image.cxx:(.text+0x1b7): undefined reference to `jpeg_finish_decompress'
/usr/bin/ld: Fl_JPEG_Image.cxx:(.text+0x1e3): undefined reference to `jpeg_destroy_decompress'
I still can't solve it!
Miguel Gimenez:
--- Quote ---I have changed the code now
--- End quote ---
Well, you have changed the code, the compiler (MiinGW to Clang) and the OS (Windows to Linux) in a row.
You must add a jpeg library to the linker, probably libjpeg.so
hrz:
--- Quote from: Miguel Gimenez on June 18, 2021, 06:25:17 pm ---
--- Quote ---I have changed the code now
--- End quote ---
Well, you have changed the code, the compiler (MiinGW to Clang) and the OS (Windows to Linux) in a row.
You must add a jpeg library to the linker, probably libjpeg.so
--- End quote ---
I don't know how to add it. In my FLTK library, I can't find anyone who's name just like libjpeg.
I read the codes in "libfltk_jpeg.h", the functon proto just match it. So i think it is the problem of code::blocks setting.
stahta01:
https://wiki.codeblocks.org/index.php/FAQ-Compiling_(errors)#Q:_My_build_fails_with_multiple_undefined_reference_errors.3F
Tim S.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version