Compilation error on multiblend

52 views
Skip to first unread message

arlene fu

unread,
Sep 21, 2018, 1:30:50 PM9/21/18
to hugin and other free panoramic software
When I tried to compile multiblend before using hugin, I use the following command to compile:

g++ -msse2 -O3 -ltiff -ltiffxx -ljpeg -lpng multiblend.cpp -o

(which is provided in build.txt file under the folder of multiblend)

However, I always got the error shown below:


In file included from multiblend.cpp:51:


./loadimages.cpp:21:11: warning: comparison of unsigned expression >= 0 is


      always true [-Wtautological-compare]


  while (p>=0) {


         ~^ ~


./loadimages.cpp:67:11: warning: comparison of unsigned expression >= 0 is


      always true [-Wtautological-compare]


  while (p>=0) {


         ~^ ~


In file included from multiblend.cpp:55:


./write.cpp:26:2: error: no matching function for call to 'jpeg_set_quality'


        jpeg_set_quality(&cinfo,g_jpegquality,true);


        ^~~~~~~~~~~~~~~~


/usr/local/include/jpeglib.h:991:14: note: candidate function not viable: no


      known conversion from 'bool' to 'boolean' for 3rd argument


EXTERN(void) jpeg_set_quality JPP((j_compress_ptr cinfo, int quality,


             ^


In file included from multiblend.cpp:55:


./write.cpp:27:2: error: no matching function for call to 'jpeg_start_compress'


        jpeg_start_compress(&cinfo,true);


        ^~~~~~~~~~~~~~~~~~~


/usr/local/include/jpeglib.h:1010:14: note: candidate function not viable: no


      known conversion from 'bool' to 'boolean' for 2nd argument


EXTERN(void) jpeg_start_compress JPP((j_compress_ptr cinfo,


             ^


2 warnings and 2 errors generated.


Is anybody meeting this situation? 

Bruno Postle

unread,
Sep 22, 2018, 6:07:00 AM9/22/18
to hugin and other free panoramic software
On Fri 21-Sep-2018 at 10:28 -0700, arlene fu wrote:
>When I tried to compile multiblend before using hugin, I use the following
>command to compile:
>
>g++ -msse2 -O3 -ltiff -ltiffxx -ljpeg -lpng multiblend.cpp -o

>In file included from multiblend.cpp:55:
>
>*./write.cpp:26:2: **error: **no matching function for call to
>'jpeg_set_quality'*
>
> jpeg_set_quality(&cinfo,g_jpegquality,true);

>*/usr/local/include/jpeglib.h:991:14: note: *candidate function not viable:
>no known conversion from 'bool' to 'boolean' for 3rd argument
>
>EXTERN(void) jpeg_set_quality JPP((j_compress_ptr cinfo, int quality,

I'm not sure what the problem is. What versions of gcc and libjpeg
are you using?

Can you test without the -ljpeg flag and see if this builds?

--
Bruno

Monkey

unread,
Sep 22, 2018, 12:31:28 PM9/22/18
to hugin and other free panoramic software
It (probably) won't build without -ljpeg. Try changing the "true" on those two lines to "boolean(true)"

For the warnings, you can change p>=0 to p>0 (strictly speaking it is a bug, but not one you are likely to trigger unless you have pathological input images).
Reply all
Reply to author
Forward
0 new messages