Menu

Linker Error, using Jpeglib from Image Libs.

2002-12-04
2012-09-26
  • Nobody/Anonymous

    Hi,

    I have just downloaded the Image Libraries Package from the vUpdate utility. In this package are included all the headers (.h) and libraries (.a) needed. I was making a small program to load a jpeg image to use it as a texture with OpenGL. I have made that before with tga, and bmp formats, but jpeg is just giving me a headache. The program compiled ok, but the linker returns a lot of:
    [Linker error] undefined reference to `jpeg_read_header(jpeg_decompress_struct *, int)'

    I have the -ljpeg option in the linker options settings, but still doesn't work.
    Do I need to add something else to the linker? Is the static jpeg library (libjpeg.a) wrong?
    Anybody who could help me, It'll be just great.

    Ver: DevC++ 4.9.6.9
    With the latest updates.

    thanks in advance
    jluis

     
    • Anonymous

      Anonymous - 2002-12-05

      I've had the same sort of problems trying to use
      the libjpeg. I tried to get some help on the forum,
      apparantly no one can make it work or they're not
      sharing the info.

      Dale

       
    • Anonymous

      Anonymous - 2002-12-05

      I also have the same problems with jpeg library. All help i got till now was to try new version of mingw compiller(in devc is v2.9 and newest is 3.2) or try to change compiling from C++ to C. I also got message, that jpeg library is uncompilable under DevC.
      I tested jpeg lib on Dev-C++ v.4.9.7 with OpenGL tutorials BSP_Loader1, BSP_Loader2 and BSP_Loader3. All with the same crash result.

      I also got link to jpeglib documentation, so i hope it will help you.
      If you have any news about this topic, please contact me.

      Zvejk

       
      • Anonymous

        Anonymous - 2002-12-05

        Sorry, i am stupid, i forgot to include the link, so its here: http://www.the-labs.com/JPEG/libjpeg.html

         
    • Nobody/Anonymous

      :(

      So bad to hear that.
      Please! somebody has to know how to make this thing work.

      jluis

       
    • Nobody/Anonymous

      try IPicture interface instead, it seems to add only 6k to your exe, whereas libjpeg adds about 150k

      sowhat? alrighty then, do a search for a post from a week or two ago, something about libjpeg with me posting (drarem).

      Or do a search within the \lib directory for the jpeg_read_header and include that library (.a). Linker errors are just that, you aren't including the right lib in your project options.

      - drarem

       
    • Nobody/Anonymous

      Ok.. I found it:

      http://sourceforge.net/forum/forum.php?thread_id=770696&forum_id=48211

      Forum title is: where to find libjpeg, go to that website, download the example and look at what they included, etc. I would do that for you but my puter power supply is french fries and i'm on a different machine.

      - drarem

       
    • Nobody/Anonymous

      LOVELY !!!

      Ohh man, that french link is the most useful site I've seen in months.
      The library works fantastic, at last!
      Thank you so much, it will be very helpful for many others too.

      btw, why the library downloaded from blodsheed doesn't work properly? just curious.

      thanks again!

      jluis

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.