cornel90 / ffmpegthumbnailer

Automatically exported from code.google.com/p/ffmpegthumbnailer
GNU General Public License v2.0
0 stars 0 forks source link

jpegwriter.cpp compile failure on OS X (bool vs boolean) #107

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Building ffmpegthumbnailer-2.0.8 on OS X with clang as the compiler, the build 
fails with this error:

/bin/sh ./libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.   
-I/sw/include -D__STDC_CONSTANT_MACROS  -I/sw/lib/ffmpeg-2.0/include   
-I/sw/include/libpng16   -g -O2 -MT libffmpegthumbnailer_la-jpegwriter.lo -MD 
-MP -MF .deps/libffmpegthumbnailer_la-jpegwriter.Tpo -c -o 
libffmpegthumbnailer_la-jpegwriter.lo `test -f 
'libffmpegthumbnailer/jpegwriter.cpp' || echo 
'./'`libffmpegthumbnailer/jpegwriter.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I/sw/include 
-D__STDC_CONSTANT_MACROS -I/sw/lib/ffmpeg-2.0/include -I/sw/include/libpng16 -g 
-O2 -MT libffmpegthumbnailer_la-jpegwriter.lo -MD -MP -MF 
.deps/libffmpegthumbnailer_la-jpegwriter.Tpo -c 
libffmpegthumbnailer/jpegwriter.cpp  -fno-common -DPIC -o 
.libs/libffmpegthumbnailer_la-jpegwriter.o
libffmpegthumbnailer/jpegwriter.cpp:136:12: error: cannot initialize return 
object of type
      'boolean' with an rvalue of type 'bool'
    return true;
           ^~~~
1 error generated.

The error happens regardless of my using clang, llvm-gcc or GNU gcc.

Original issue reported on code.google.com by niederst...@gmail.com on 2 Oct 2013 at 4:31

GoogleCodeExporter commented 9 years ago
try changing the line to "return 1;"
That will probably fix it. If it works I'll deliver the fix. 

Original comment by dirk.vdb on 3 Oct 2013 at 2:38

GoogleCodeExporter commented 9 years ago
No change.  Sorry.

/bin/sh ./libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.   
-I/sw/include -D__STDC_CONSTANT_MACROS  -I/sw/lib/ffmpeg-2.0/include   
-I/sw/include/libpng16   -g -O2 -MT libffmpegthumbnailer_la-jpegwriter.lo -MD 
-MP -MF .deps/libffmpegthumbnailer_la-jpegwriter.Tpo -c -o 
libffmpegthumbnailer_la-jpegwriter.lo `test -f 
'libffmpegthumbnailer/jpegwriter.cpp' || echo 
'./'`libffmpegthumbnailer/jpegwriter.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I/sw/include 
-D__STDC_CONSTANT_MACROS -I/sw/lib/ffmpeg-2.0/include -I/sw/include/libpng16 -g 
-O2 -MT libffmpegthumbnailer_la-jpegwriter.lo -MD -MP -MF 
.deps/libffmpegthumbnailer_la-jpegwriter.Tpo -c 
libffmpegthumbnailer/jpegwriter.cpp  -fno-common -DPIC -o 
.libs/libffmpegthumbnailer_la-jpegwriter.o
libffmpegthumbnailer/jpegwriter.cpp:136:12: error: cannot initialize return 
object of type 'boolean' with an rvalue of type 'int'
    return 1;
           ^
1 error generated.

If I instead change it to "return TRUE;", it compiles.  I don't know enough C++ 
to know if this is actually a valid change, although ffmpegthumbnailer seems to 
work fine (no error making a jpg thumbnail).

Original comment by niederst...@gmail.com on 3 Oct 2013 at 2:59

GoogleCodeExporter commented 9 years ago
TRUE seems to properly match the boolean type indeed. The fix has been delivered

Original comment by dirk.vdb on 3 Oct 2013 at 4:17

GoogleCodeExporter commented 9 years ago
Great.  Thank you.  With this fix, I've now made ffmpegthumbnailer available on 
OS X via the Fink package manager.

Original comment by niederst...@gmail.com on 3 Oct 2013 at 4:50