Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8752885
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:19:11+00:00 2026-06-13T13:19:11+00:00

I need JPEG handling capabilities in my project so I decided to use jpeg-8d

  • 0

I need JPEG handling capabilities in my project so I decided to use jpeg-8d library, after downloading packages I’ve made usual ./configure; make and make install. make test returns no errors and no problems was reported during the whole process but when I opened example.c in Code Blocks 10.05 compilation failed. I’ve “googled” some solutions and added

#ifdef __cplusplus
extern "C" {
#endif
...
#ifdef __cplusplus
}
#endif

In jpeglib.h file, recompiled, then added these lines to linker section of code blocks:
/usr/local/lib/libjpeg.a
/usr/local/lib/libjpeg.so
also added according directories into directories section.
but compiler still fails to compile example.c, here are some of the errors:

> /home/raff/CodeBlocks/jpeg-8d/example.c|116|warning: incompatible implicit declaration of built-in function ‘exit’|
> example.c|| undefined reference to 'image_width'
> example.c|| undefined reference to 'image_height'

If anyone successfully installed and used jpeg library please help, I have no problem in switching IDE and/or linux distribution.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T13:19:12+00:00Added an answer on June 13, 2026 at 1:19 pm

    Your instalation of the library seems to be fine (otherwise it would complain about missing jpeglib.h during compilation)

    The file example.c is supposed to be part of documentation, not a code you can compile and use. Note that there’s no main(), for example. You should use it as a reference on how to code methods for compressing and decompressing jpeg files.

    The variables image_width and image_height (and image_buffer) are declared as extern, so they are assumed to be defined in some other file. You can write your program defining those variables and filling up the buffer and only after that you can use the provided methods (write_JPEG_file and read_JPEG_file).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to use some part of a jpeg image (a rectangle in the
I need to encrypt a lot of large JPEG files. The pictures are very
I need to find the size of a JPEG (JFIF) image. The image is
I have a jpeg image in a char[] buffer in memory, all I need
I need to find all image files from directory (gif, png, jpg, jpeg). find
I need user download JPEG file from my app, however, when user change the
I need to be able to export PDF's that I am creating to JPEG,
I need to write a Ruby script that can take a collection of jpeg
I have got two images, say png and jpeg and I need to overlay
I need to be able to validate if a JPEG image is valid and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.