0

I just installed the FLTK library and a bunch of header files from Stroustrup's homepage.... I know it can't find some file, but can any give me any ideas on what specifically maybe be the problem?

1>Graph.obj : error LNK2019: unresolved external symbol "public: __thiscall Fl_GIF_Image::Fl_GIF_Image(char const *)" (??0Fl_GIF_Image@@QAE@PBD@Z) referenced in function "public: __thiscall Graph_lib::Image::Image(struct Point,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,enum Graph_lib::Suffix::Encoding)" (??0Image@Graph_lib@@QAE@UPoint@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@W4Encoding@Suffix@1@@Z)
1>Graph.obj : error LNK2019: unresolved external symbol "public: __thiscall Fl_JPEG_Image::Fl_JPEG_Image(char const *)" (??0Fl_JPEG_Image@@QAE@PBD@Z) referenced in function "public: __thiscall Graph_lib::Image::Image(struct Point,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,enum Graph_lib::Suffix::Encoding)" (??0Image@Graph_lib@@QAE@UPoint@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@W4Encoding@Suffix@1@@Z)
user2904033
  • 133
  • 1
  • 3
  • 13

3 Answers3

2

It can't find the definition of the function calls. You probably aren't linking the .lib file.

IdeaHat
  • 7,641
  • 1
  • 22
  • 53
  • As far as I know there is an instruction how to install this library. You can get it either in site of the FLTK or in site of Stroustrup. – Vlad from Moscow Dec 30 '13 at 20:18
  • @VladfromMoscow This isn't an install error, this is a not setting the file-to-link problem. All the person needs to do is go to ensure that the correct .lib files are in the "Additional Libraries" entry in the project properties. – IdeaHat Dec 30 '13 at 20:20
  • It means indeed an install error. the files and/or libraries were installed in wrong directories and corresponding parameters were not set correctly. For example as I remember there is detailed instruction how to install FLTK for MS VC++. – Vlad from Moscow Dec 30 '13 at 20:23
  • No, it does **not** mean there was an installation problem. Have you configured your project to link those libraries? Simply putting them into a specific directory does not mean they are being linked by your project. – Captain Obvlious Dec 30 '13 at 20:25
  • @VladfromMoscow if it was an install error, he would be getting a "Cannot find library" error, but hes getting an "unresolved external symbol" so he is finding the headers, but not the binary definitions of the functions. Granted, these libraries could not exist (and be an instal error) but Occam Razor would make me think hes simply not linking it. Could be both though. – IdeaHat Dec 30 '13 at 20:30
  • @VladfromMoscow it could also be an install error if he built the library for the wrong toolchain, then indeed he could link successfully to the .lib file but get no definitions with the correct symbols. Welcome to dll hell... – IdeaHat Dec 30 '13 at 20:32
  • @MadScienceDreams You think that there can not be an install error with libraries? That such an error can be only with headers? – Vlad from Moscow Dec 30 '13 at 20:32
2

This means that the lonker did not find the definitions of these member functions.

Vlad from Moscow
  • 301,070
  • 26
  • 186
  • 335
  • The "lonker" is "bonkers". ;-) – Fiddling Bits Dec 30 '13 at 20:00
  • Could you please be more specific? There were a lot of steps in building the FLTK that I didn't fully understand, and now adding stroustrup's private library. I don't even know where the function is being called, cause it's not from my source code. – user2904033 Dec 30 '13 at 20:08
0

You are not linking fltkimages.lib and fltkjpeg.lib or if you are running the debug version fltkimagesd.lib and fltkjpegd.lib.

cup
  • 7,589
  • 4
  • 19
  • 42