0

Hi Im trying to use the FLTK library to draw a bunch of images. My problem is that I cannot open any *.jpg file with FLTK's Fl_JPEG_Image

std::vector<Img> displayedImages; // my clas containning paths to images loaded from database
std::vector<Fl_JPEG_Image*> images;
std::vector<Fl_Box*> boxes;

Fl_JPEG_Image im(displayedImages.at(i).getThumb().c_str()); // this line gives an error while input provided is absolute path of a file
images.push_back(&im);

the error I keep getting is :

unresolved external symbool "public: __thiscall Fl_JPEG_Image(const cahr*)"

any idea what that means and how to resolve this bug?

joasisk
  • 61
  • 1
  • 13
  • 1
    1) Is this on windows or Linux? 2) Does fltkjpeg.lib or fltkjpegd.lib or libfltkjpeg.a exist in the lib directory 3) Has it been added to the link line? – cup May 05 '15 at 21:50
  • its on windows and in lib is only fltk.lib i added all the fl_*.h files in VS13 default include folders (added them folowing this manual http://www.c-jump.com/bcc/common/Talk2/Cxx/FltkInstallVC/FltkInstallVC.html) – joasisk May 07 '15 at 08:02
  • 1
    Part 6 of the guide: add fltkjpeg.lib – cup May 07 '15 at 08:10
  • Hi I'm having another problem... i was trying to add image to my fl_group but was not able to do so... i was trying to identify where the problem ocurs and acording to specification on fltk's webpage if image is opened with fl_JPEG_image(const char* path) constructor correctly, calling image->w() should return >0 but it does not... i dont know if im entering path correctly (in proper way) im on win and the path to file is "e:\\zaloha\\Pictures\\my\\DSC_0242.jpg" and that is the way i typed it but after oppening width is stil 0 – joasisk May 13 '15 at 15:55
  • Raise that as a new question - this one has already been answered – cup May 13 '15 at 18:51

1 Answers1

0

Thanks to cup i found my nooby problem and solved it by simply adding missing .libs to my project.

joasisk
  • 61
  • 1
  • 13